Excluding page authorization in a form authentication directory

G

Gnic

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
 
K

Ken Cox - Microsoft MVP

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]
 
G

Gnic

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



Ken Cox - Microsoft MVP said:
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]


Gnic said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top