Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET-4 IIS7.5 web.config serverRuntime element

Whenever I add this line to my web.config in the system.webServer section:

<serverRuntime />

With our without properties, IIS 7.5 just serves up a blank page instead of the website. I created a new empty Web Application using IIS and added the line to the web.config; blank page.

What am I doing wrong?

like image 702
joop Avatar asked Aug 28 '10 11:08

joop


2 Answers

So you are actually adding this to your web config?

<location path="Default Web Site">
   <system.webServer>
      <serverRuntime enabled="true"
         frequentHitThreshold="1"
         frequentHitTimePeriod="00:00:20" />
   </system.webServer>
</location>

There are several important things to bear in mind...

  1. That you are running IIS7 in integrated mode, not classic mode.
  2. That you have the enabled="true" attribute set on serverRuntime

Further reading on MSDN

http://msdn.microsoft.com/en-us/library/aa347568%28VS.90%29.aspx

like image 118
Fenton Avatar answered Sep 29 '22 14:09

Fenton


I had this exact problem and solved it by unlocking the serverRuntime section of the applicationHost config. Command to run at console:

%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/serverRuntime
like image 36
Haney Avatar answered Sep 29 '22 13:09

Haney