Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Excluding page authorization in a form authentication directory

Reply
Thread Tools

Excluding page authorization in a form authentication directory

 
 
Gnic
Guest
Posts: n/a
 
      03-21-2006
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


 
Reply With Quote
 
 
 
 
Ken Cox - Microsoft MVP
Guest
Posts: n/a
 
      03-21-2006
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...b;en-us;815174

Ken
Microsoft MVP [ASP.NET]


"Gnic" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
 
Gnic
Guest
Posts: n/a
 
      03-21-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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...b;en-us;815174
>
> Ken
> Microsoft MVP [ASP.NET]
>
>
> "Gnic" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
URL Authorization does not override File Authorization? SeanRW ASP .Net Security 1 05-25-2006 06:18 AM
Excluding a directory from build. Norman Crandall ASP .Net 1 01-13-2006 02:41 AM
Excluding certian pages from Forms authentication =?Utf-8?B?U2FtYmE=?= ASP .Net 5 08-30-2005 11:17 AM
Excluding a page from ASP.NET forms authentication Frank Rizzo ASP .Net 2 01-12-2004 10:56 PM
Excluding certain files from forms authentication Paul Cook ASP .Net 1 08-07-2003 05:40 PM



Advertisments