10

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?

joop
  • 321
  • 3
  • 8

2 Answers2

25

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
Haney
  • 32,775
  • 8
  • 59
  • 68
9

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

Fenton
  • 241,084
  • 71
  • 387
  • 401
  • Actually, Haney’s answer might be more relevant. At least on the servers where I have tried it, simply adding the serverRuntime element to web.config will cause an error when any paths matched by the corresponding location specification are hit. Either, one can do the configuration directly in appSettings.config, as described in http://www.iis.net/configreference/system.webserver/serverruntime (which is what I did), or presumably, unlocking the element as suggested by Haney will make it possible to have the configuration in web.config. – Otto G Dec 05 '15 at 16:56