I am using the Rewrite Module on IIS 7.

When I restart the Application Pool I get a Authentication Required window that doesn't except any credentials that it is given and when you click cancel it goes to a 401 unauthorized page.

The rewrite rule sends the request to an ashx page in a virtual directory (_assets).

How can I resolve this strange behavior?

Anonymous is turned on and it works fine.

The following is the rewrite rule we are using:

        <rule name="Loader" patternSyntax="ECMAScript" stopProcessing="true">
            <match url="^[a-z0-9\-\/]*$" negate="false" />
  <action type="Rewrite" url="/_assets/includes/load.ashx?q={UrlEncode:{REQUEST_URI}}" appendQueryString="false" />

2 Answers 2


Are you using anonymous authentication as your authentication method? Do you have made any changes related to url rewrite modules recently?

Also, try the following command to ensure that the auth-method is configured properly:

c:\Windows\System32\inetsrv>appcmd list config "http://[site]/view/user.aspx" -section:system.webServer/security/authentication/windowsauthentication

  • Big bounty if you can solve this: stackoverflow.com/questions/15744509/… Commented Apr 5, 2013 at 17:24
  • I get a error: ERROR ( message:Configuration error Filename: redirection.config Line Number: 0 Description: Cannot read configuration file due to insufficient permissions . ) Commented Apr 23, 2013 at 16:06

Enabling Kernel Mode Authentication is what fixed this issue for me.

  1. Select the site in IIS7.

  2. Open Authentication properties (below).

  3. Double click Windows Authentication.
  4. Click the checkbox next to Enable Kernel-mode authentication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.