Kralizek
Kralizek

Reputation: 2063

White page with MVC4+ on IIS 7.0

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.

Upvotes: 1

Views: 1308

Answers (2)

Wolf
Wolf

Reputation: 6499

When i using One Click publish After setup again server . I need click publish again and everything is working as desired

Upvotes: 0

Kralizek
Kralizek

Reputation: 2063

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

Upvotes: 1

Related Questions