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>
I can get past the weird login by going to /.reset
. This causes a 500 error and then the site is available again.
Note: Our application pools restart nightly.