I am trying to install an MVC3 application on our production server with no luck. The application is from a 3rd party (compiled), and so debugging is not available to me. Besides, I strongly suspect the error occurs before any code in the site has a chance to execute. Our staging server is - as far as I can determine - set up excactly like the production server. Both run Windows Server 2008 Standard R2, both also run a Sharepoint 2010 site (though this install doesn't touch that in any way). IIS is version 7.5, and .NET Framework 4.0 (required by the MVC app) is (recently) installed (by me, with a reboot after). The application is very small and simple and, as far as I can tell sticks to fairly standard functionality - including forms authentication (ie. it doesnt' pull any dirty tricks). The error message shown in the browser is very general:
The bit about 'An error message detailing the cause' being in the application event log seems to be just speculation - a pious hope that whatever code actually caused the error will log it. Nothing useful is to be found in the event log (only the very same message, logged by IIS).
Using Failed Request Tracing, I have been able to track the error (as also indicated above) to the AspNetInitClrHostFailureModule:
So there you have it. Seemingly, the AspNetInitClrHostFailureModule fails to find some file. So some questions are:
This question might well be a duplicate of this one, but he didn't get any useful answer, and also asked less specific questions. So I'll have my own go. Hoping for some help here :) Edit: I have now tried setting up a trivial MVC 3 project on the server. I created a new project using the MVC Application template, compiled it and deployed it to the server. It behaves in exactly the same way. The server simply cannot run MVC 3 projects. I would uninstall and reinstall ASP.NET. I've had issues occur after installing the .NET Framework that I do this almost routinely now. To uninstall: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ua To reinstall: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i If you need to run 32-bit applications, you would also need to run the aspnet_regiis in the C:\Windows\Microsoft.NET\Framework\v4.0.30319 folder. Note that performing the re-installation would affect other ASP.NET web applications if there are any running. Because the issue occurs so early, it may be useful to enable the .NET Framework Fusion logging. This is designed to provide verbose information about what is occurring during the loading of assemblies. If all the assemblies are loading ok, I would use Process Monitor to get a trace. That may point you in the right direction for what it was doing at the time of failure. http://www./blog/BackToBasicsUsingFusionLogViewerToDebugObscureLoaderErrors.aspx If it is an issue of a missing assembly, you can determine what assemblies your application needs by inspecting the manifest. This can be done with ildasm.exe (IL Disassembler) or ILSpy. I've seen a lot of MVC apps crash at startup with a meaningless error message when introduced on a new server because an assembly (dll) existed in development or test, but not on the new server. If that is the case, it may be one of the following assemblies that need to be copied to the bin folder of the web site:
When you install the ASP.NET MVC msi proper, it usually copies many of those files to a folder in C:\Program Files x86, or under C:\Windows\winsxs somewhere (global assembly cache). Note that this issue may also occur if the vendor is signing their assemblies, but they are delay-signed. That would also be revealed in the Fusion log. A description of that symptom is here: Delay Signing an Assembly |
|
来自: icecity1306 > 《开发资料》