Groups | Blog | Home
all groups > asp.net > march 2006 >

asp.net : Excluding page authorization in a form authentication directory


Gnic
3/20/2006 10:44:25 PM
Hi,

I am a page that sit on a form authentication directory, but I have 1 or 2
pages that don't require form authentication, also I have a web service
class in this directory as well, I am wondering how can I exclude those aspx
and asmx from form authentication?

thanks

Gnic

Ken Cox - Microsoft MVP
3/20/2006 11:00:35 PM
You can configure special settings by using the <location> element in the
web.config. For example, this allows anonymous users to access
mywebservice.asmx.

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<location path="mywebservice.asmx" >
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
....

Here's more info:

How To Make Application and Directory-Specific Configuration Settings in an
ASP.NET Application

http://support.microsoft.com/default.aspx?scid=kb;en-us;815174

Ken
Microsoft MVP [ASP.NET]


[quoted text, click to view]

Gnic
3/21/2006 11:00:43 AM
That works for .NET framework 1.x, but in 2.0, it requires the sub directory
to be an IIS application inorder to use the location element.

My problem is that my ASP hosting service doesn't allow us to create IIS
application in sub folder, that's why I have to put everything in one
folder.

So, is there any way that I can exclude some of the pages from Form
Authentication in a single directory?

thanks

Gnic



[quoted text, click to view]

AddThis Social Bookmark Button