0

I'm having a problem setting up autrhentication and authorisation in IIS7 and the web config file for an ASP.NET 3.5 application.

What I want to do is restrict access to content that is being served by IIS, so all pages/assets, but I want to do this via the web config file so I can allow access to specific resources when the right url (with an access token in it) is provided.

I currently have anonymous authentication enabled in IIS. In the web config, the authentication mode for .NET is set to none. I've got an authorisation node in the web config denying access to all users (*) but I'm still able to access static content (an html page) from the site. Does anyone know whe're I'm going wrong in setting up the authentication/authorisation?

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by mmccull
0

I've managed to solve the problem by adding the follwing to the web config.

<system.webServer>
  <modules>
       <remove name="UrlAuthorization" />    
       <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" />    
  </modules>
 </system.webServer>

It seems to be working ok now but it would be good to know if anyone else has experienced similar problems and if there are other soultions as well as this one.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.