473,508 Members | 2,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with ASP.NET 2.0 Location override of Forms Authentication settings

Hi all,

We have an asp.net 1.1 app that we're in the process of converting to
2.0. What I'm about to describe runs just great in the 1.1
framework, but does not work in the 2.0 framework.

This app uses forms authentication and denies all unauthenticated
users. There is a location override in the web.config so that we can
open up a directory for unauthenticated users to create a login
account. There is only 1 web.config in the app, and it's located in
the root directory. Here are the relevant parts of the web.config:

<configuration>
<system.web>
<authentication mode="Forms">
<forms loginUrl="login/login.aspx" name="dmdotcomauth"
protection="All" timeout="20" path="/"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
</system.web>

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

</configuration>
In the signup folder are a couple of aspx files used to create the
login account. In ASP.NET 1.1, when the user browses to the aspx
files in the signup folder, such as http://localhost/webapp/signup/CreateAccount.aspx,
that aspx file display correctly, no problem. However in ASP.NET
2.0, when the user browses to that same file, the user is redirected
to the login page. In ASP.NET 2.0, if I login to the app, and then
browse to the CreateAccount.aspx, then it works OK....however this is
obviously not what I'm looking for, but it proves that the
CreateAccount.aspx page functions properly in the 2.0 environment.
It it matters any, from an IIS standpoint, the virtual directory
"webapp" is set to allow anonymous access and windows integrated
authentication.

Has anyone run into problems dealing with forms authentication
overrides for subfolders in ASP.NET 2.0 using the <locationelement
of the web.config? This used to work fine in 1.1, I'm not sure what's
different now.

--steve

Mar 13 '07 #1
1 6438
On Mar 13, 10:03 am, "n33470" <n33...@gmail.comwrote:
Hi all,

We have an asp.net 1.1 app that we're in the process of converting to
2.0. What I'm about to describe runs just great in the 1.1
framework, but does not work in the 2.0 framework.

This app uses forms authentication and denies all unauthenticated
users. There is a location override in the web.config so that we can
open up a directory for unauthenticated users to create a login
account. There is only 1 web.config in the app, and it's located in
the root directory. Here are the relevant parts of the web.config:

<configuration>
<system.web>
<authentication mode="Forms">
<forms loginUrl="login/login.aspx" name="dmdotcomauth"
protection="All" timeout="20" path="/"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
</system.web>

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

</configuration>

In the signup folder are a couple of aspx files used to create the
login account. In ASP.NET 1.1, when the user browses to the aspx
files in the signup folder, such ashttp://localhost/webapp/signup/CreateAccount.aspx,
that aspx file display correctly, no problem. However in ASP.NET
2.0, when the user browses to that same file, the user is redirected
to the login page. In ASP.NET 2.0, if I login to the app, and then
browse to the CreateAccount.aspx, then it works OK....however this is
obviously not what I'm looking for, but it proves that the
CreateAccount.aspx page functions properly in the 2.0 environment.
It it matters any, from an IIS standpoint, the virtual directory
"webapp" is set to allow anonymous access and windows integrated
authentication.

Has anyone run into problems dealing with forms authentication
overrides for subfolders in ASP.NET 2.0 using the <locationelement
of the web.config? This used to work fine in 1.1, I'm not sure what's
different now.

--steve
I figured it out. It was a coding problem on our side within the
CreateAccount page that caused the redirect to the login page. It was
not the forms authentication that caused the redirect.

The forms authentication design using the location override for
authorization values in different sub folders works just fine in
ASP.NET 2.0.

--steve

Mar 13 '07 #2

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

Similar topics

1
3055
by: Hugh McLaughlin | last post by:
Hello Everyone and thanks for your help in advance. I recently installed Visual Studio 2003 and .Net 1.1. I then converted one of my applications to 2003. However, I am running into a probelm...
1
2486
by: MJ | last post by:
I'm building an application that has a file structure similar to the following: /myapp/user_login.aspx /myapp/user_page_1.aspx /myapp/user_page_2.aspx /myapp/user_page_3.aspx...
0
311
by: Tony | last post by:
Hi I'm trying to debug the sample application in ASP.NET (CommereVBSDK) but the .NET environment is not allowing me to debug. I get the following error Error while trying to run project. Unable...
1
4004
by: Rhy Mednick | last post by:
I'm creating a custom control (inherited from UserControl) that is displayed by other controls on the form. I would like for the control to disappear when the user clicks outside my control the...
3
4837
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
0
347
by: Rob Locher | last post by:
Greetings, I am having a problem with tracing our ASP.NET application via trace.axd. Whenever I point my browser at http://mymachine/webapp/trace.axd, I get redirected to the same page to...
3
1046
by: angus | last post by:
Dear All, In my web application, i have a login screen to allow the user to login to my system. all user should be logined in before they can use the system. my question is how to aviod...
2
4247
by: John | last post by:
Hi I am trying to setup a customised membership provider and I am getting the following error when trying to run the app; The entry 'AspNetSqlMembershipProvider' has already been added. The...
0
1366
by: Jeff | last post by:
Hey asp.net 2.0 I want my website to be available only for authenticated users (except the front page (Default.aspx) which all users can view). If an anonymous user tryes to access other...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7124
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1558
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.