Question

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:

<rewrite>
    <rules>
        <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" />
        </rule>
    </rules>
</rewrite>
Was it helpful?

Solution 2

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top