473,396 Members | 1,992 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,396 software developers and data experts.

forms authentication issue

I have an app that will direct to the login on any unauthorized access. It
will redirect back to the calling page when authenticated. Now here is the
problem.
I'm allowing for user registration via a link on the lgin page, but my
registrstion page is re-directing me back to login.aspx.
I've enabled session state to in proc to prevent multi logins with the same
user. Would this cause a problem?
here is my web.config sections that i've changed.
<authentication mode="Forms">
<forms
name=".STARTERCookie"
loginUrl="Login.aspx"
protection="All"
timeout="10">
</forms>
</authentication>
<authorization>
<deny users="?" />
</usthorization>
<sessionState
mode="InProc"
cookieless="true"
timeout="120"
/>

thanks (as always)
some day i'm gona pay this forum back for all the halp i'm getting
kes
Nov 19 '05 #1
4 1706
Ya-no-wat? der'r some days dat ant no good gona happen!
well....... this is one of those days!
yes, it needs to be in a seprate directory with it's own web.config.

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"WebBuilder451" wrote:
I have an app that will direct to the login on any unauthorized access. It
will redirect back to the calling page when authenticated. Now here is the
problem.
I'm allowing for user registration via a link on the lgin page, but my
registrstion page is re-directing me back to login.aspx.
I've enabled session state to in proc to prevent multi logins with the same
user. Would this cause a problem?
here is my web.config sections that i've changed.
<authentication mode="Forms">
<forms
name=".STARTERCookie"
loginUrl="Login.aspx"
protection="All"
timeout="10">
</forms>
</authentication>
<authorization>
<deny users="?" />
</usthorization>
<sessionState
mode="InProc"
cookieless="true"
timeout="120"
/>

thanks (as always)
some day i'm gona pay this forum back for all the halp i'm getting
kes

Nov 19 '05 #2
Hello,
You can use the <location> tag in your main web.config as well.

It would be something like this in your web.config:
<configuration>
<system.web>
<authentication mode="Forms">
<forms name="your_name" loginUrl="login.aspx" protection="All"
path="/YourApp" timeout="20" />
</authentication>
</system.web>

<location allowOverride="true">
<system.web>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="your_login_register_folder">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>

Should you have any further questions or comments, let me know.

Regards,
Cesar

"WebBuilder451" wrote:
Ya-no-wat? der'r some days dat ant no good gona happen!
well....... this is one of those days!
yes, it needs to be in a seprate directory with it's own web.config.

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"WebBuilder451" wrote:
I have an app that will direct to the login on any unauthorized access. It
will redirect back to the calling page when authenticated. Now here is the
problem.
I'm allowing for user registration via a link on the lgin page, but my
registrstion page is re-directing me back to login.aspx.
I've enabled session state to in proc to prevent multi logins with the same
user. Would this cause a problem?
here is my web.config sections that i've changed.
<authentication mode="Forms">
<forms
name=".STARTERCookie"
loginUrl="Login.aspx"
protection="All"
timeout="10">
</forms>
</authentication>
<authorization>
<deny users="?" />
</usthorization>
<sessionState
mode="InProc"
cookieless="true"
timeout="120"
/>

thanks (as always)
some day i'm gona pay this forum back for all the halp i'm getting
kes

Nov 19 '05 #3
thanks, I did not know of this.
i do have a beginner beginner problem question on this
1. does the folder specified need to contain its own web application with
bin? and does this need to be a seprate project (different dll)?
i've not been able to get the registration page to come up without error
2. can a specific web page be allowed using the <location
allowOverride="true">
?
fyi i'm using vs.net
i can post the errors if needed.
thanks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"Cesar" wrote:
Hello,
You can use the <location> tag in your main web.config as well.

It would be something like this in your web.config:
<configuration>
<system.web>
<authentication mode="Forms">
<forms name="your_name" loginUrl="login.aspx" protection="All"
path="/YourApp" timeout="20" />
</authentication>
</system.web>

<location allowOverride="true">
<system.web>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="your_login_register_folder">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>

Should you have any further questions or comments, let me know.

Regards,
Cesar

"WebBuilder451" wrote:
Ya-no-wat? der'r some days dat ant no good gona happen!
well....... this is one of those days!
yes, it needs to be in a seprate directory with it's own web.config.

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"WebBuilder451" wrote:
I have an app that will direct to the login on any unauthorized access. It
will redirect back to the calling page when authenticated. Now here is the
problem.
I'm allowing for user registration via a link on the lgin page, but my
registrstion page is re-directing me back to login.aspx.
I've enabled session state to in proc to prevent multi logins with the same
user. Would this cause a problem?
here is my web.config sections that i've changed.
<authentication mode="Forms">
<forms
name=".STARTERCookie"
loginUrl="Login.aspx"
protection="All"
timeout="10">
</forms>
</authentication>
<authorization>
<deny users="?" />
</usthorization>
<sessionState
mode="InProc"
cookieless="true"
timeout="120"
/>

thanks (as always)
some day i'm gona pay this forum back for all the halp i'm getting
kes

Nov 19 '05 #4
Hello,
NO, the subfolder is not another application with its own bin folder. It
is just a subfolder that is not protected.
With the first location tag you are telling the app to deny access to all
unauthenticated users and to allow access to all other users (notice that the
deny tag is first)
<deny users="?" />
<allow users="*" />

The second location tag is overriding the whole app security and it is
allowing ALL users (notice that the second location does not have the <deny>
tag. It is in the second location tag where you should try to use the single
file. I have not tried it though!

<location path="your_login_register_folder">

The problem that I may foresee is that if your web page has any reference
(any reference at all) to any other file, you will be requested to login.
That is, if you are showing an image, a chart, or you are even using a
stylesheet, you may be requested to login so that you would need to disable
the access to all those files.

I would suggest to use a different folder where you can isolate all those
items that are not protected.

Should you have any further questions or comments, let me know.

Regards,
Cesar Saucedo

"WebBuilder451" wrote:
thanks, I did not know of this.
i do have a beginner beginner problem question on this
1. does the folder specified need to contain its own web application with
bin? and does this need to be a seprate project (different dll)?
i've not been able to get the registration page to come up without error
2. can a specific web page be allowed using the <location
allowOverride="true">
?
fyi i'm using vs.net
i can post the errors if needed.
thanks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"Cesar" wrote:
Hello,
You can use the <location> tag in your main web.config as well.

It would be something like this in your web.config:
<configuration>
<system.web>
<authentication mode="Forms">
<forms name="your_name" loginUrl="login.aspx" protection="All"
path="/YourApp" timeout="20" />
</authentication>
</system.web>

<location allowOverride="true">
<system.web>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="your_login_register_folder">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>

Should you have any further questions or comments, let me know.

Regards,
Cesar

"WebBuilder451" wrote:
Ya-no-wat? der'r some days dat ant no good gona happen!
well....... this is one of those days!
yes, it needs to be in a seprate directory with it's own web.config.

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"WebBuilder451" wrote:

> I have an app that will direct to the login on any unauthorized access. It
> will redirect back to the calling page when authenticated. Now here is the
> problem.
> I'm allowing for user registration via a link on the lgin page, but my
> registrstion page is re-directing me back to login.aspx.
> I've enabled session state to in proc to prevent multi logins with the same
> user. Would this cause a problem?
> here is my web.config sections that i've changed.
> <authentication mode="Forms">
> <forms
> name=".STARTERCookie"
> loginUrl="Login.aspx"
> protection="All"
> timeout="10">
> </forms>
> </authentication>
> <authorization>
> <deny users="?" />
> </usthorization>
> <sessionState
> mode="InProc"
> cookieless="true"
> timeout="120"
> />
>
> thanks (as always)
> some day i'm gona pay this forum back for all the halp i'm getting
> kes

Nov 19 '05 #5

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

Similar topics

1
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...
4
by: Greg Burns | last post by:
I have built a web app that uses forms authentication. There isn't a "remember me" feature (i.e. the authentication cookie is not permanent). When you close the browser, and open a new one, you...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
7
by: Justin | last post by:
I am trying to password protect a subdirectory using forms authentication. I am using the "Location" tag to specify the directory to be protected. The login.aspx page is in the root directory of...
5
by: Cesar | last post by:
Hello, I have an application that is using forms authentication and it seems to be working fine most of the time. Unfortunatelly, it sometimes just redirects me to the login screen. It seems that...
2
by: Wiktor Zychla [C# MVP] | last post by:
Hi, I struggle for over an hour with the integrated Cassini web server. the problem I am facing is as follows: when I turn forms authentication on in the web.config file, the website seems to...
6
by: eric.olstad | last post by:
I'm pullin my hair out here. I've created a login page that uses Forms Authentication. Initially, it loads the types of authentication methods from a database and asks the user to select the auth...
4
by: =?Utf-8?B?RmFyaWJh?= | last post by:
It know that we can use the following method http://msdn2.microsoft.com/en-us/library/eb0zx8fc.aspx to form authenticate across multiple applications. I have created an asp.net application...
3
by: =?Utf-8?B?QXhlbCBEYWhtZW4=?= | last post by:
Hi, we've got a strange problem here: We've created an ASP.NET 2.0 web application using Membership.ValidateUser() to manually authenticate users with our website. The problem is: If the...
4
by: =?Utf-8?B?R3V1czEyMw==?= | last post by:
Hi, I created a web site on a remote server. To logon the user must enter a user id and password. The site is uses Forms Authentication. The web config file looks as follows: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
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,...

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.