Implementing a .NET application in ISV MS CRM 4.0 - dynamics-crm

I'm trying to create a small application within CRM in the ISV folder.
I created a new application using Visual studio 2008. The only thing it does is Response.Write("Hello world!") in the onLoad-function. I compiled it and uploaded it to a virtual folder (app) in the ISV directory in CRM.
If I now go to crm.mycrm.nl:5555/ISV/app I get:
'Microsoft.Crm.WebServices.Crm2007.CookieAndSoapHeaderAuthenticationProvider,
Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' doesn't exist. Parameter name:
Microsoft.Crm.WebServices.Crm2007.CookieAndSoapHeaderAuthenticationProvider,
Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35
With stack trace
[ArgumentException: 'Microsoft.Crm.WebServices.Crm2007.CookieAndSoapHeaderAuthenticationProvider, Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' doesn't exist.
Parameter name: Microsoft.Crm.WebServices.Crm2007.CookieAndSoapHeaderAuthenticationProvider, Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]
Microsoft.Crm.Authentication.BaseAuthenticationSettings.CreateType(String typeName, Type requiredBaseType) +265
Microsoft.Crm.Authentication.BaseAuthenticationSettings.CreateProvider(String typeName, IDictionary`2 configuration) +28
Microsoft.Crm.Authentication.AuthenticationPipelineSettings.LoadPipeline() +262
Microsoft.Crm.Authentication.AuthenticationPipelineSettings.get_AuthenticationProvider() +16
Microsoft.Crm.Authentication.AuthenticationEngine.Execute(Object sender, EventArgs e) +524
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Okay, I fixed it. The thing is, you have to put your assemblies into the CRMWeb folder, and your aspx file into the ISV folder.

Related

Error Loading Project: Visual C# 2015 compiler could not be created

I am using Visual Studio 2015 Community Edition in Windows 10 Professional(64 bit).
Today I installed the new Visual Studio Update 3 and now I am getting this error
E:\path_to_solution_folder\ProjectName.Web.csproj : error :
Project 'ProjectName.Web' could not be opened because the Visual C# 2015 compiler could not be created. An exception was thrown while initializing part "Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService".
Googled a bit, and got a solution from this website,
Link: Fixing Visual Studio 2015 after update 3
So as per the article, I added System.Reflection.Metadata.dll to GAC.
Now when I try to run my project or open a controller the IDE still restarts! Went to the event logger and found out this.
Application: devenv.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: System.IO.FileNotFoundException: Could not load file or assembly 'System.Reflection.Metadata, Version=1.0.21.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Reflection.Metadata, Version=1.0.21.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ...
Details
Log Name: Application
Source: .NET Runtime
Date: 25-Jul-16 9:29:13 PM
Event ID: 1025
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: Lenovo
Description:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: System.IO.FileNotFoundException: Could not load file or assembly 'System.Reflection.Metadata, Version=1.0.21.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Reflection.Metadata, Version=1.0.21.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.CodeAnalysis.CSharp.CSharpCompilationFactoryService.Microsoft.CodeAnalysis.Host.ICompilationFactoryService.CreateCompilation(String assemblyName, CompilationOptions options)
at Microsoft.CodeAnalysis.Solution.CompilationTracker.CreateEmptyCompilation()
at Microsoft.CodeAnalysis.Solution.CompilationTracker.<BuildDeclarationCompilationFromScratchAsync>d__24.MoveNext()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack:
at System.Environment.FailFast(System.String, System.Exception)
at Microsoft.CodeAnalysis.FailFast.OnFatalException(System.Exception)
at Microsoft.CodeAnalysis.ErrorReporting.FatalError.Report(System.Exception, System.Action`1<System.Exception>)
at Microsoft.CodeAnalysis.ErrorReporting.FatalError.ReportUnlessCanceled(System.Exception)
at Microsoft.CodeAnalysis.Solution+CompilationTracker+<BuildDeclarationCompilationFromScratchAsync>d__24.MoveNext()
at Microsoft.CodeAnalysis.CSharp.CSharpCompilationFactoryService.Microsoft.CodeAnalysis.Host.ICompilationFactoryService.CreateCompilation(System.String, Microsoft.CodeAnalysis.CompilationOptions)
at Microsoft.CodeAnalysis.Solution+CompilationTracker.CreateEmptyCompilation()
at Microsoft.CodeAnalysis.Solution+CompilationTracker+<BuildDeclarationCompilationFromScratchAsync>d__24.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Solution+CompilationTracker+<BuildDeclarationCompilationFromScratchAsync>d__24, Microsoft.CodeAnalysis.Workspaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<BuildDeclarationCompilationFromScratchAsync>d__24 ByRef)
at Microsoft.CodeAnalysis.Solution+CompilationTracker.BuildDeclarationCompilationFromScratchAsync(Microsoft.CodeAnalysis.Solution, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Solution+CompilationTracker+<BuildCompilationFromScratchAsync>d__23.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Solution+CompilationTracker+<BuildCompilationFromScratchAsync>d__23, Microsoft.CodeAnalysis.Workspaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<BuildCompilationFromScratchAsync>d__23 ByRef)
at Microsoft.CodeAnalysis.Solution+CompilationTracker.BuildCompilationFromScratchAsync(Microsoft.CodeAnalysis.Solution, State, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Solution+CompilationTracker.BuildCompilationAsync(Microsoft.CodeAnalysis.Solution, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Solution+CompilationTracker+<GetOrBuildCompilationAsync>d__21.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Solution+CompilationTracker+<GetOrBuildCompilationAsync>d__21, Microsoft.CodeAnalysis.Workspaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetOrBuildCompilationAsync>d__21 ByRef)
at Microsoft.CodeAnalysis.Solution+CompilationTracker.GetOrBuildCompilationAsync(Microsoft.CodeAnalysis.Solution, Boolean, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Solution.GetCompilationAsync(Microsoft.CodeAnalysis.Project, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Document+<GetSemanticModelAsync>d__21.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Document+<GetSemanticModelAsync>d__21, Microsoft.CodeAnalysis.Workspaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetSemanticModelAsync>d__21 ByRef)
at Microsoft.CodeAnalysis.Document.GetSemanticModelAsync(System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Editor.CSharp.NavigationBar.CSharpNavigationBarItemService+<GetTypesInFileAsync>d__3.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Editor.CSharp.NavigationBar.CSharpNavigationBarItemService+<GetTypesInFileAsync>d__3, Microsoft.CodeAnalysis.CSharp.EditorFeatures, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetTypesInFileAsync>d__3 ByRef)
at Microsoft.CodeAnalysis.Editor.CSharp.NavigationBar.CSharpNavigationBarItemService.GetTypesInFileAsync(Microsoft.CodeAnalysis.Document, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Editor.CSharp.NavigationBar.CSharpNavigationBarItemService+<GetItemsAsync>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Editor.CSharp.NavigationBar.CSharpNavigationBarItemService+<GetItemsAsync>d__1, Microsoft.CodeAnalysis.CSharp.EditorFeatures, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetItemsAsync>d__1 ByRef)
at Microsoft.CodeAnalysis.Editor.CSharp.NavigationBar.CSharpNavigationBarItemService.GetItemsAsync(Microsoft.CodeAnalysis.Document, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController+<ComputeModelAsync>d__30.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController+<ComputeModelAsync>d__30, Microsoft.CodeAnalysis.EditorFeatures, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<ComputeModelAsync>d__30 ByRef)
at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController.ComputeModelAsync(Microsoft.CodeAnalysis.Document, Microsoft.VisualStudio.Text.ITextSnapshot, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController+<>c__DisplayClass29_0.<StartModelUpdateAndSelectedItemUpdateTasks>b__0(System.Threading.Tasks.Task)
at System.Threading.Tasks.ContinuationResultTaskFromTask`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1025</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2016-07-25T15:59:13.647712200Z" />
<EventRecordID>8082</EventRecordID>
<Channel>Application</Channel>
<Computer>Lenovo</Computer>
<Security />
</System>
<EventData>
<Data>Application: devenv.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: System.IO.FileNotFoundException: Could not load file or assembly 'System.Reflection.Metadata, Version=1.0.21.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Reflection.Metadata, Version=1.0.21.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.CodeAnalysis.CSharp.CSharpCompilationFactoryService.Microsoft.CodeAnalysis.Host.ICompilationFactoryService.CreateCompilation(String assemblyName, CompilationOptions options)
at Microsoft.CodeAnalysis.Solution.CompilationTracker.CreateEmptyCompilation()
at Microsoft.CodeAnalysis.Solution.CompilationTracker.<BuildDeclarationCompilationFromScratchAsync>d__24.MoveNext()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack:
at System.Environment.FailFast(System.String, System.Exception)
at Microsoft.CodeAnalysis.FailFast.OnFatalException(System.Exception)
at Microsoft.CodeAnalysis.ErrorReporting.FatalError.Report(System.Exception, System.Action`1<System.Exception>)
at Microsoft.CodeAnalysis.ErrorReporting.FatalError.ReportUnlessCanceled(System.Exception)
at Microsoft.CodeAnalysis.Solution+CompilationTracker+<BuildDeclarationCompilationFromScratchAsync>d__24.MoveNext()
at Microsoft.CodeAnalysis.CSharp.CSharpCompilationFactoryService.Microsoft.CodeAnalysis.Host.ICompilationFactoryService.CreateCompilation(System.String, Microsoft.CodeAnalysis.CompilationOptions)
at Microsoft.CodeAnalysis.Solution+CompilationTracker.CreateEmptyCompilation()
at Microsoft.CodeAnalysis.Solution+CompilationTracker+<BuildDeclarationCompilationFromScratchAsync>d__24.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Solution+CompilationTracker+<BuildDeclarationCompilationFromScratchAsync>d__24, Microsoft.CodeAnalysis.Workspaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<BuildDeclarationCompilationFromScratchAsync>d__24 ByRef)
at Microsoft.CodeAnalysis.Solution+CompilationTracker.BuildDeclarationCompilationFromScratchAsync(Microsoft.CodeAnalysis.Solution, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Solution+CompilationTracker+<BuildCompilationFromScratchAsync>d__23.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Solution+CompilationTracker+<BuildCompilationFromScratchAsync>d__23, Microsoft.CodeAnalysis.Workspaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<BuildCompilationFromScratchAsync>d__23 ByRef)
at Microsoft.CodeAnalysis.Solution+CompilationTracker.BuildCompilationFromScratchAsync(Microsoft.CodeAnalysis.Solution, State, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Solution+CompilationTracker.BuildCompilationAsync(Microsoft.CodeAnalysis.Solution, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Solution+CompilationTracker+<GetOrBuildCompilationAsync>d__21.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Solution+CompilationTracker+<GetOrBuildCompilationAsync>d__21, Microsoft.CodeAnalysis.Workspaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetOrBuildCompilationAsync>d__21 ByRef)
at Microsoft.CodeAnalysis.Solution+CompilationTracker.GetOrBuildCompilationAsync(Microsoft.CodeAnalysis.Solution, Boolean, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Solution.GetCompilationAsync(Microsoft.CodeAnalysis.Project, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Document+<GetSemanticModelAsync>d__21.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Document+<GetSemanticModelAsync>d__21, Microsoft.CodeAnalysis.Workspaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetSemanticModelAsync>d__21 ByRef)
at Microsoft.CodeAnalysis.Document.GetSemanticModelAsync(System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Editor.CSharp.NavigationBar.CSharpNavigationBarItemService+<GetTypesInFileAsync>d__3.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Editor.CSharp.NavigationBar.CSharpNavigationBarItemService+<GetTypesInFileAsync>d__3, Microsoft.CodeAnalysis.CSharp.EditorFeatures, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetTypesInFileAsync>d__3 ByRef)
at Microsoft.CodeAnalysis.Editor.CSharp.NavigationBar.CSharpNavigationBarItemService.GetTypesInFileAsync(Microsoft.CodeAnalysis.Document, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Editor.CSharp.NavigationBar.CSharpNavigationBarItemService+<GetItemsAsync>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Editor.CSharp.NavigationBar.CSharpNavigationBarItemService+<GetItemsAsync>d__1, Microsoft.CodeAnalysis.CSharp.EditorFeatures, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetItemsAsync>d__1 ByRef)
at Microsoft.CodeAnalysis.Editor.CSharp.NavigationBar.CSharpNavigationBarItemService.GetItemsAsync(Microsoft.CodeAnalysis.Document, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController+<ComputeModelAsync>d__30.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController+<ComputeModelAsync>d__30, Microsoft.CodeAnalysis.EditorFeatures, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<ComputeModelAsync>d__30 ByRef)
at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController.ComputeModelAsync(Microsoft.CodeAnalysis.Document, Microsoft.VisualStudio.Text.ITextSnapshot, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController+<>c__DisplayClass29_0.<StartModelUpdateAndSelectedItemUpdateTasks>b__0(System.Threading.Tasks.Task)
at System.Threading.Tasks.ContinuationResultTaskFromTask`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
</Data>
</EventData>
</Event>
How to fix this issue?

Webmatrix crashing whenever site is opened or created

A couple of days ago I tried to open my Orchards MVC site from WebMatrix and it crashed. Currently any site I try and open, or even if I attempt to create an empty site, causes WebMatrix to stop working. I get windows error dialog box telling me that "Web Matrix Has Stopped Working". I am completely at a loss on what caused this. I already posted on the iis.net forums (http://forums.iis.net/post/2061458.aspx) but have not received a reply.
I have restarted, uninstalled and resinstalled both WebMatrix and IIS 8 express.
There are two errors in the event viewer. Detailed below. Anyhow would be very appreciated since this is keeping me from working on my site.
Thanks in advance.
First Error
Application: WebMatrix.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
at Microsoft.WebMatrix.Core.DynamicHelp.DynamicHelpManager.GetMatchedContent(Microsoft.WebMatrix.Core.DynamicHelp.DynamicHelpProviderLevelContent, Microsoft.WebMatrix.Core.DynamicHelp.IApplicationStateChangedContext)
at Microsoft.WebMatrix.Core.DynamicHelp.DynamicHelpManager+HelpContent.<GetContent>b__22(Microsoft.WebMatrix.Core.DynamicHelp.DynamicHelpProviderLevelContent)
at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
at System.Linq.Enumerable+WhereEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
at System.Linq.Enumerable+<SelectManyIterator>d__14`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Collections.Generic.KeyValuePair`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
at System.Linq.Lookup`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Create[[System.Collections.Generic.KeyValuePair`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.Collections.Generic.KeyValuePair`2<System.__Canon,System.__Canon>>, System.Func`2<System.Collections.Generic.KeyValuePair`2<System.__Canon,System.__Canon>,System.__Canon>, System.Func`2<System.Collections.Generic.KeyValuePair`2<System.__Canon,System.__Canon>,System.__Canon>, System.Collections.Generic.IEqualityComparer`1<System.__Canon>)
at System.Linq.GroupedEnumerable`3[[System.Collections.Generic.KeyValuePair`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetEnumerator()
at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
at System.Linq.Buffer`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>)
at System.Linq.Enumerable.ToArray[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
at Microsoft.WebMatrix.Core.DynamicHelp.DynamicHelpManager+HelpContent.GetContent(System.Collections.Generic.IEnumerable`1<Microsoft.WebMatrix.Core.DynamicHelp.IDynamicHelpContentProvider>)
at Microsoft.WebMatrix.Core.DynamicHelp.DynamicHelpManager+<GetHelpHistoryEnumerator>d__1b.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Func`2<System.__Canon,Boolean>)
at Microsoft.WebMatrix.Core.DynamicHelp.DynamicHelpManager.get_LatestHelp()
at Microsoft.WebMatrix.Core.DynamicHelp.DynamicHelpManager.RaiseLatestHelpContentUpdated()
at Microsoft.WebMatrix.Core.DynamicHelp.DynamicHelpManager.OnApplicationStateChanged(System.Object, Microsoft.WebMatrix.Core.DynamicHelp.ApplicationStateChangedEventArgs)
at Microsoft.WebMatrix.Core.DynamicHelp.ApplicationStateWhenInputIdleNotifier.<.ctor>b__0()
at Microsoft.WebMatrix.Utility.SingletonBackgroundAction+<>c__DisplayClass2.<.ctor>b__0(System.Object)
at Microsoft.WebMatrix.Utility.SingletonBackgroundAction`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].RunAction(System.__Canon)
at Microsoft.WebMatrix.Utility.SingletonBackgroundAction`1+<>c__DisplayClass3[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<Schedule>b__1(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Second Error
Faulting application name: WebMatrix.exe, version: 7.1.1932.0, time stamp: 0x52589c06
Faulting module name: Microsoft.WebMatrix.Core.ni.dll, version: 7.1.1932.0, time stamp: 0x52589c13
Exception code: 0xc0000005
Fault offset: 0x005e9398
Faulting process id: 0x2318
Faulting application start time: 0x01cedff7bbec8f10
Faulting application path: C:\Program Files (x86)\Microsoft WebMatrix\WebMatrix.exe
Faulting module path: C:\Windows\assembly\NativeImages_v4.0.30319_32\Microsoft.W38826ba1#\89265eccf2f3657048b6111d09c73386\Microsoft.WebMatrix.Core.ni.dll
Report Id: fd0ed1bd-4bea-11e3-bec0-98fc11e3977e
Faulting package full name:
I did NOT have to uninstall WebMatrix 3. I just deleted this folder and its contents.
C:\Users\your_username\AppData\Local\Microsoft\WebMatrix
Uninstall Webmatrix3 and install Webmatrix2, this is solved my problem
I have the same issue. I guess the issue is caused by a php component installed. Anyway, the following steps solve my issue.
1) Remove Webmatrix 3
2) Delete C:\Users\your_username\AppData\Local\Microsoft\WebMatrix
3) Reinstall Webmatrix 3
I had the same problem. To solve it:
Uninstall Web Matrix
Backup My Web Sites directory
search for WebMatrix on the C:\ and delete everything including DLL
Re-install WebMatrix
Even if I try and open my site with webmatrix3, to create an empty site causes WebMatrix to stop working.
Solution for me
1.) Remove Webmatrix 3
2.) Delete C:\Users\your_username\AppData\Local\Microsoft\WebMatrix
3.) Reinstall Webmatrix 3
I didn't have to uninstall webmatrix. Just deleting the folder as above worked.
Delete C:\Users\your_username\AppData\Local\Microsoft\WebMatrix
Unbelievable though that it's still an issue? How many years later..?
uninstalled Webmatrix 3
Delete C:\Users\your_username\AppData\Local\Microsoft\WebMatrix
installed webmatrix 2 works for my sites

Assembly created by Moles in VS2010 is referencing MVC3 and MVC4 after install of VS2012

Assembly 'dllname.Moles, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
A MVC3 solution targetting the .NET4.0 framework, with a unittest project using the Moles framework, worked perfectly in Visual Studio 2010. MVC4 was not installed on this computer.
After installation of Visual Studio 2012 (and the mandatory in place replacement of .NET4.0 by .NET4.5 and the installation of MVC4), the unittest project doesn't compile anymore in VS2010, it complains about the given error.
When we inspect the assembly, we see effectively that it is referencing MVC4 and MVC3??
BoneSoft.CSS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
itextsharp, Version=5.1.2.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca
Microsoft.ExtendedReflection, Version=0.94.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Microsoft.Moles.Framework, Version=0.94.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
NHibernate.Validator, Version=1.3.1.4000, Culture=neutral, PublicKeyToken=70154e18752585bd
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Runtime.Caching, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
MVC4 is never referenced in the whole solution, but Moles somewhere thinks it must be included when generating a 'moles assembly' of a assembly who is referencing MVC3.
I have also moles assemblies of other assemblies who are not referencing MVC3 and there no problem at compiling time.
I deleted already the moles assembly in the project, rebuilded and recreated the moles assembly: same error.
Ideas where to search the problem?
When you installed VS 2012, it installed MVC4 on the box. MVC 3 wont work well SxS with MVC 4. You need to update MVC 3 app to work on machine where MVC 4 is installed.This is documented in release notes for MVC 4.0. Please read section Installing ASP.NET MVC 4 breaks ASP.NET MVC 3 RTM applications. Follow setps "Required updates".
I was getting a similar error on a project so I removed the reference to MVC and re-added the reference to MVC 3, then I was able to compile.
Looking at the .csproj file, before it read:
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
and after re-adding the reference:
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
So it looks like the tag <SpecificVersion>False</SpecificVersion> was letting the project look for the reference to the newer version of MVC, which was causing the version conflict.

Migrating my MVC 3 application to MVC 4

I really do not know what to do, I'm following this article that shows how to migrate my MVC 3 application manually .
I followed all the steps but when running my application the following error occurs:
Server Error in '/' Application.
Could not load file or assembly 'System.Web.WebPages.Razor,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or
one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or
assembly 'System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to
determine why the assembly 'System.Web.WebPages.Razor,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
could not be loaded.
WRN: Assembly binding logging is turned OFF. To enable assembly bind
failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There
is some performance penalty associated with assembly bind failure
logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileLoadException: Could not load file or assembly
'System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)]
Microsoft.Web.Samples.PreApplicationStartCode.Start() +0
[InvalidOperationException: The pre-application start initialization
method Start on type Microsoft.Web.Samples.PreApplicationStartCode
threw an exception with the following error message: Could not load
file or assembly 'System.Web.WebPages.Razor, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040).]
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1
methods) +423
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +306
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters,
PolicyLevel policyLevel, Exception appDomainCreationException) +677
[HttpException (0x80004005): The pre-application start initialization
method Start on type Microsoft.Web.Samples.PreApplicationStartCode
threw an exception with the following error message: Could not load
file or assembly 'System.Web.WebPages.Razor, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040).]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9079340
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +256
Version Information: Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.0.30319.237
I looked through the code, but I see no reference to System.Web.WebPages.Razor in version 1.0 version 2.0 only.
Use NuGet and add the package Microsoft.AspNet.Mvc (Microsoft Asp.Net Mvc 4). This should upgrade your references. See:
https://nuget.org/packages/Microsoft.AspNet.Mvc
You will need to upgrade the assembly references in your web.config.
Remove from the root web.config:
<assemblies>
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
Add to the root web.config:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Views/Web.Config:
Change Razor from 1.0.0.0 to 2.0.0.0:
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
Did you forget to update the references in Views\Web.Config? The references in it is used to build the view pages.
I assumed you have MVC3 Intranet web application, when upgrade from MVC3 to MVC4 using NuGet, your application now references System.Web.WebPages.Razor Version 2.0.0.0, NOT System.Web.WebPages.Razor Version 1.0.0.0 anymore. Here is my way of resolving the reference.
There are two places to fix:
In the root web.config,
<compilation debug="true" targetFramework="4.0">
<assemblies>
. . .
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
. . .
</assemblies>
</compilation>
change Version=1.0.0.0 to Version=2.0.0.0
So your new reference will look like this:
<compilation debug="true" targetFramework="4.0">
<assemblies>
. . .
<add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
. . .
</assemblies>
</compilation>
In the Views folder, there is web.config file. Inspecting this file you will see it references Version 1. Replace the whole web.config file in Views folder with a new web.config file. Make a backup of the old web.config file, just in case. To get a brand new web.config for the Views folder, you create a new MVC4 application for intranet. Go to the Views folder. Copy the Web.Config file from the Views folder of the new application to the Views folder of the broken application.
Hope it helps!
Reinstalling the AspNetSprite packages as suggested above does not solve the problem for me. But adding theses lines on the runtime\assemblyBinding section of the root web.config file works :
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
Have you globally searched for System.Web.WebPages.Razor, Version=1.0.0.0 in your entire solution? Do you still reference System.Web.WebPages.Razor (Version 1.0.0.0)? Do you reference System.Web.WebPages.Razor Version 2.0.0.0?
[Update] I finally ran into the same issue. It seems like one of the NuGet packages I installed and uninstalled didn't entirely remove the reference to System.Web.Razor it used. Cleaning the solution didn't help because the DLL wasn't used directly by the web application. I finally got it to work by manually deleting the entire bin directory ...
Check the web.config inside your views folder.
UPDATE:
This bit looks suspcious.
Microsoft.Web.Samples.PreApplicationStartCode
Are you referencing any sample application libraries, like MVC futures or anything like that?
My application used a third-party package, the AspNetSprites-MvcAndRazorHelper. Reinstalled this package and the error of the reference was corrected.
This is another Nuget package that u can use to upgrade mvc 3 to mvc 4
https://nuget.org/packages/UpgradeMvc3ToMvc4
this is very simple, when you update to MVC 4.0.0.0 ,but the webconfig in the solution still points to MVC 3.0.0.0.0.
so just replace MVC version 3.0.0.0.0. by 4.0.0.0.0
Do the same with other assemblies, to check the version of assembly , check properties of the respective assembly in references in your project.

Could not load file or assembly 'System.Web.Ajax, Version=3.0.31106.0

HI folks,
I have a .net application (vb.net) and I'm using the ajax control toolkit. It works fine on my production machine but when I upload it to the host (fasthosts) i get this error:
Could not load file or assembly 'System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The module was expected to contain an assembly manifest.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The module was expected to contain an assembly manifest.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[BadImageFormatException: Could not load file or assembly 'System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The module was expected to contain an assembly manifest.]
AjaxControlToolkit.ToolkitScriptManager.ApplyAssembly(ScriptReference script, Boolean isComposite) +0
AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e) +167
System.Web.UI.ScriptManager.RegisterScripts() +191
System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +113
System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +8698462
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1029
Here is my web.conf file. Its very simple:
<system.web>
<customErrors mode="Off"/>
<compilation debug="true">
<assemblies>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation></system.web>
Does anyone know whats up?
-- Billy
In order to use ASP.NET AJAX, you would have installed the ASP.NET AJAX framework on your machine, which includes this DLL that is causing the error.
The chances are that your hosting company doesn't have ASP.NET AJAX installed.
This post is old but just in case someone else needs help in this issue. Below are 3 easy steps to fixing it:
Step 1: Download the latest ajax toolkit from Codeplex.com.
Step 2: Extract the zip file. (Optional) --> Google the net on how to add the new ajax controls to your Toolbox. It is also simple.
Step 3: Copy and paste all the contents of the extracted folder to the BIN folder of your project.
Rebuild and run it.

Resources