Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When clicking on the Url Rewrite feature in the IIS7 Manager I get an error:

There was an error while performing this operation.

Details:

Filename: \\?\C:\Domains\...<blah_blah>...\web.config
Error: The configuration section 'system.webServer/rewrite/rules'
cannot be read because it is missing a section declaration

I just moved from a IIS6 setup to a IIS7 server and my web.config file does not have a rewrite section under system.webServer

share|improve this question
add comment

1 Answer

IIS6 and IIS7 use distinct parts of the web.config file in order to specify site configuration.

For example, IIS6 uses the system.web section, whereas IIS7 uses the system.webServer section. But, it's not so simple as changing that one element because the underlying children are also different.

Some key changes:

  • <httpModules> and <httpHandlers> have been renamed to <modules> and <handlers>, respectively.
  • Each handler in IIS7 requires a name attribute. If you don't specify it, you'll get an error message.
  • The handlers node has an optional, but good-to-define accessPolicy attribute. This value depends on your handlers, so use the ones that are right for you.

These suggestions and more information can be found in this posting: Use a Single Web.Config for IIS6 and IIS7

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.