I use ASP .Net 4 and I have a project using the form web authentication
<authentication mode="Forms">
<forms loginUrl="~/" timeout="7200" />
</authentication>
I have a web service in the same project and I want to disable this web authentication for one page (a web service)
I tryed that code :
<location path="WSBaseCentrale.asmx" allowOverride="false">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
But I've a 302 redirection to the form logon. Is it possible to disable it ?
Edit
I tryied that and it doesn't work better. When I access to the page (http://localhost/App/WSBaseCentrale.asmx) I am always redirected to the form page (http://localhost/App/) with an HTTP 302 redirection.
<location path="WSBaseCentrale.asmx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
Edit 2
Some others facts :
- the anonymous user in iis is activated.
- When I use firebug (I desactive the cache and I remove the cookie), I can reproduce the problem every time. Moreover, I can see in the response header that the server send a Location directive to the browser.