Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.NET Forms Authentication Problem(s)...

Reply
Thread Tools

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

 
 
Mr.KisS
Guest
Posts: n/a
 
      07-11-2004
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.
 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      07-11-2004
"Mr.KisS" <> wrote in message
news:2b33901c46755$3ebd9730$...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best practices for using forms authentication and security in a hosted env (was: Re: Using a Forms authentication in a shared hosting environment) JEFF ASP .Net 1 11-12-2007 07:00 PM
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
Forms authentication - Multiple login forms based on directory acc Keltex ASP .Net Security 1 01-24-2006 03:06 PM
Forms Authentication question: How to have some pages open and some requiring forms authentication Eric ASP .Net 2 02-13-2004 02:14 PM
Forms Authentication, external authentication server, & rerouting to orig. req. URL Andrew Connell ASP .Net 1 10-21-2003 05:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57