Error: Rewrite/globalRules cannot be read

This post has been republished via RSS; it originally appeared at: IIS Support Blog articles.

IIS stores majority of its configuration in the applicationHost.config file. If there are syntax errors or missing entries in this file, one or more IIS features may not work. In this case, IIS may display an error in this case. In my case, IIS showed the error message below once we tried to open URL Rewrite module in IIS Manager:
There was an error while performing this operation.
Error: The configuration section ‘system.webServer/rewrite/globalRules’ cannot be read because it is missing a section declaration


Follow steps below for solution. Please back up your applicationHost.config file first.
  • In IIS server, check if this file exists: %SystemRoot%\system32\inetsrv\rewrite.dll. If the file exists, continue the steps below. If it doesn’t, search for the file in server. If it doesn’t exist, it means URL Rewrite is not installed. It should be installed first
  • Open applicationHost.config file
  • Add the following line into the <globalModules> section


<add name="RewriteModule" image="%SystemRoot%\system32\inetsrv\rewrite.dll" />


  • Add the lines below in the <configSections> section:


<sectionGroup name="rewrite"> <section name="globalRules" overrideModeDefault="Deny" allowDefinition="AppHostOnly" /> <section name="rules" overrideModeDefault="Allow" /> <section name="outboundRules" overrideModeDefault="Allow" /> <section name="providers" overrideModeDefault="Allow" /> <section name="rewriteMaps" overrideModeDefault="Allow" /> <section name="allowedServerVariables" overrideModeDefault="Deny" /> </sectionGroup>


  • Add your URL Rewrite rule in the <system.webServer> section. Example:


<rewrite> <globalRules> <rule name="Remove authToken parameter from Query String" enabled="true" stopProcessing="true"> … </rule> </globalRules> </rewrite>


  • Save the file
  • Reset IIS

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.