473,378 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

while using FormsAuthentication exempt a directory

I want to exempt an entire subdirectory "/help" from the need for
FormsAuthentication. How can I do it?

I am using .Net FormsAuthentication to require login to all non member pages
in my application via
<authentication mode="Forms">
<forms loginUrl="loginPage.aspx" name="AuthorizationCookie"
requireSSL="false" slidingExpiration="true" timeout="20" path="/"
protection="All" >
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>

I allow access to a particular page via

<location path="welcome.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>

this is all for the root directory.

I want to exempt an entire subdirectory "/help" from the need for
FormsAuthentication. How can I do it?

Thanks
Mike
Jul 21 '05 #1
2 1919
Create a web.config file in the sub directory.

And add the following code in it:

<configuration>
<system.web>
<authentication mode="none" />
</system.web>
</configuration>

And thats all that should be in the file.
This will override the authentication settings from the parent folder.

Darshan

"Mike" wrote:
I want to exempt an entire subdirectory "/help" from the need for
FormsAuthentication. How can I do it?

I am using .Net FormsAuthentication to require login to all non member pages
in my application via
<authentication mode="Forms">
<forms loginUrl="loginPage.aspx" name="AuthorizationCookie"
requireSSL="false" slidingExpiration="true" timeout="20" path="/"
protection="All" >
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>

I allow access to a particular page via

<location path="welcome.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>

this is all for the root directory.

I want to exempt an entire subdirectory "/help" from the need for
FormsAuthentication. How can I do it?

Thanks
Mike

Jul 21 '05 #2
Darshan,

Thank you for answering my question

"Darshan Mehta" wrote:
Create a web.config file in the sub directory.

And add the following code in it:

<configuration>
<system.web>
<authentication mode="none" />
</system.web>
</configuration>

And thats all that should be in the file.
This will override the authentication settings from the parent folder.

Darshan

"Mike" wrote:
I want to exempt an entire subdirectory "/help" from the need for
FormsAuthentication. How can I do it?

I am using .Net FormsAuthentication to require login to all non member pages
in my application via
<authentication mode="Forms">
<forms loginUrl="loginPage.aspx" name="AuthorizationCookie"
requireSSL="false" slidingExpiration="true" timeout="20" path="/"
protection="All" >
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>

I allow access to a particular page via

<location path="welcome.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>

this is all for the root directory.

I want to exempt an entire subdirectory "/help" from the need for
FormsAuthentication. How can I do it?

Thanks
Mike

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Cantekin Guneser | last post by:
firstly thanks for your help, I have solved problem but now I have different problem that my project includes normal pages that anonymous forms at main directory, when I use FormsAuthentication...
2
by: VR | last post by:
Hi, I am using Forms type of authentication, but having problems redirecting users to default page after they get authenticated. My default page is default.aspx, but it's in 'public'...
3
by: Fredrik Elestedt | last post by:
Hi, I've been trying to use FormsAuthentication agains windows users and groups - not Active Directory. I couldn't find any articles on this directly, not to say that there aren't any out...
5
by: Åženol Akbulak | last post by:
Hello; I use in my web application FormsAuthentication. Also I use Session state (InProc). When a user logged in, I can read Session parameters. (For example Session). Problem is that, when...
2
by: Mike | last post by:
I want to exempt an entire subdirectory "/help" from the need for FormsAuthentication. How can I do it? I am using .Net FormsAuthentication to require login to all non member pages in my...
2
by: rn5a | last post by:
A web.config file has the following code: <configuration> <system.web> <authentication mode="Forms"> <forms name="NETConnectCookie" loginUrl="Login.aspx"> <credentials passwordFormat="SHA1"/>...
0
by: Gert Albertse | last post by:
Is it possible to use formsauthentication against Active Directory where the connectionstring queries the GC. I get the following error message: LDAP connections on the GC port are not supported...
1
by: Rohit Ambani | last post by:
I have created Login.aspx Page On Click of Login Button.I invoke the code as follows ====================================================== Dim adPath As String = "LDAP://172.21.1.19" 'Path to your...
2
by: Mufasa | last post by:
In my website, we are using forms authentication. But every once in a while, it will seem to log you out suddenly when your in the middle of doing something. In my login page, I do the following...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.