473,503 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET Forms Authentication Problem(s)...

Hi,

I'm working with ASP.NET 2 (VWD). I have a Login page and a
folder to protect. I have a Database which contains
usernames & passwords.
The problem is that when i go to the protected folder it
automatically redirects me to the LOgin page with the rfeer
url. And when i login with false informations, its show me
the error panel. BUT, when i enter good informations, it
reloads the Login page as i've just arrived instead of
redirect me with authed cookie to the protected folder...
Any ideas? (sources codes after =>)

In my web.config i have this code to protect the fodler :
____
<system.web>
<authentication mode= "Forms">
<forms name=".WIZOUAUTH" loginUrl="Login.aspx"/>
</authentication>
</system.web>

<location path="members/">
<system.web>
<authorization>
<deny users="*" />
</authorization>
</system.web>
</location>
____

Login.aspx :
(IsGoodUser is works fine, it's the func which return if
the user exists and the password is good or not).
____
void btnLogin_Click(object sender, EventArgs e)
{
if (IsGoodUser(boxLogin.Text, boxPwd.Text) == true)
{

FormsAuthentication.RedirectFromLoginPage(boxLogin .Text, true);
}
else
{
pnlLogin.Visible = false;
pnlLogin.Enabled = false;
pnlError.Visible = true;
pnlError.Enabled = true;
}
}
____

Regards.
Nov 18 '05 #1
1 869
"Mr.KisS" <an*******@discussions.microsoft.com> wrote in message
news:2b*****************************@phx.gbl...
Hi,

I'm working with ASP.NET 2 (VWD). I have a Login page and a
folder to protect. I have a Database which contains
usernames & passwords.
The problem is that when i go to the protected folder it
automatically redirects me to the LOgin page with the rfeer
url. And when i login with false informations, its show me
the error panel. BUT, when i enter good informations, it
reloads the Login page as i've just arrived instead of
redirect me with authed cookie to the protected folder...
Any ideas? (sources codes after =>)

In my web.config i have this code to protect the fodler :
____
<system.web>
<authentication mode= "Forms">
<forms name=".WIZOUAUTH" loginUrl="Login.aspx"/>
</authentication>
</system.web>

<location path="members/">
<system.web>
<authorization>
<deny users="*" />
</authorization>
</system.web>
</location>


Try <deny users="?" />
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #2

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

Similar topics

6
4795
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
2
1703
by: Senthil | last post by:
1. Created a new C# web application project 2. Change the name of webform1 to login.aspx 3. And in the .cs file change the name of the class to login, and include System.web.security namespace....
4
2733
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...
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...
9
4612
by: Hermit Dave | last post by:
Hi, I am making a web application (rather two applications) one which is host and used by customers when they are just browsing through products. The second application resides on a secure...
1
3477
by: Rob | last post by:
I have an ASP.NET application that uses forms-based authentication. A user wishes to be able to run multiple sessions of this application simultaneously from the user's client machine. The...
5
2844
by: Gavin Stevens | last post by:
I'm trying to figure out the ASP.NET Forms Auth I have 3 or 4 pages i want to allow anonymous access to.. Then I have 5 or 6 pages I placed in another directory in the webproject. These I want...
7
2021
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...
1
6438
by: n33470 | last post by:
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. ...
4
424
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
7205
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
7287
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
7348
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...
0
7467
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
5592
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,...
1
5021
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3166
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1519
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
744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.