473,883 Members | 2,186 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:

<configuratio n>
<system.web>
<authenticati on mode="Forms">
<forms loginUrl="login/login.aspx" name="dmdotcoma uth"
protection="All " timeout="20" path="/"/>
</authentication>
<authorizatio n>
<deny users="?"/>
</authorization>
</system.web>

<location path="signup">
<system.web>
<authorizatio n>
<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.a spx, then it works OK....however this is
obviously not what I'm looking for, but it proves that the
CreateAccount.a spx 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 <locationelemen t
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 6460
On Mar 13, 10:03 am, "n33470" <n33...@gmail.c omwrote:
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:

<configuratio n>
<system.web>
<authenticati on mode="Forms">
<forms loginUrl="login/login.aspx" name="dmdotcoma uth"
protection="All " timeout="20" path="/"/>
</authentication>
<authorizatio n>
<deny users="?"/>
</authorization>
</system.web>

<location path="signup">
<system.web>
<authorizatio n>
<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.a spx,
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.a spx, then it works OK....however this is
obviously not what I'm looking for, but it proves that the
CreateAccount.a spx 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 <locationelemen t
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
3082
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 with forms authenticaion. I have set up certain subfolders that are proected and should be redirected to a login page. However, when I try to access the protected pages, I receive an HTTP 403 error, you are not authorized to view this page,...
1
2523
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 /myapp/admin/admin_login.aspx /myapp/admin/admin_page_1.aspx /myapp/admin/admin_page_2.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 to start debugging on the web server. The project is not configured to be debugged. The solution says to set 'debug=true' in the web.config file and it already has that setting. I do the development on the webserver (code , and development all...
1
4032
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 same way a menu does. To do this my control needs to get notified when the user tried to click off of it. The Leave and LostFocus events of the UserControl work most of the time but not always. For example, if they click on a part of the form...
3
4876
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 protected by forms authentication. When I create forms authentication at root level it works but when I move my code up to the subfolder I get this error: Server Error in '/TestProjects/FormsAuthenticationTestingArea' Application.
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 which default.aspx redirects all users. We are using Forms authentication, ASP.NET version 1.1, and Windows 2000. If I try to go to http://mymachine/webapp/trace.axd before I log into the application, I am redirected to the login page as if I had...
3
1058
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 the user from directly access my system by typing the exact
2
4270
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 line is: <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
0
1428
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 pages than the default.aspx, then the user should be redirected to AccessDenied.aspx.. There is the problem. I tested as a unauthenitcated user and clicked on the menu item, instead of redirecting me to AccessDenied.aspx I was redirected to...
0
11166
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10768
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10422
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9588
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5808
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6009
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4623
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 we have to send another system
2
4231
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3242
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.