问题
The problem: When creating a new ASP.NET MVC site, when deployed on production or stage, the server returns empty white pages.
To develop we use Visual Studio 2012 and the sites are created using the MVC 4 template and we have IIS 7.5 or 8.0 depending on the version of Windows.
Production and stage servers are running Windows Server 2008 with IIS 7.0.
回答1:
The cause
What we found out is that since IIS 7.5 some parts of the web.config are moved into the default configuration. Also, the web site template either assumes the IIS version or creates a web.config based on IIS 7.5. That means that when you deploy the site on a server running IIS 7.0, the problem will occur.
The solution Simply go in the web.config and add this line
<modules runAllManagedModulesForAllRequests="true" />
in the <system.webServer />
section
回答2:
When i using One Click publish
After setup again server . I need click publish again
and everything is working as desired
来源:https://stackoverflow.com/questions/20095946/white-page-with-mvc4-on-iis-7-0