Basic Security

  • Thread starter Thread starter Chris Kennedy
  • Start date Start date
C

Chris Kennedy

Got everything working in my application including database security. The
final thing I am having a problem with is:
When a user goes to the application page they are redirected to the login
page and they logout they are redirected again back to it.
When a user goes directly to the login page, when they login, it attempts to
redirect them to default.aspx, which doesn't exist. I suppose I could create
a default aspx page but really I would like to know what is going on behind
the scenes. Why doesn't .net apply the same redirect rules to login page as
it does to application pages. Regards, Chris.
 
Whoever writes the software makes the business rules.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
If you want to control where the user is redirected on login, use this code:

if (FormsAuthentication.Authenticate(txtUsername.Text, txtPwd.Text))
{
FormsAuthentication.SetAuthCookie(txtUsername.Text, false);
Response.Redirect("nextpage.aspx");
}
else
{
.....
}

"Chris Kennedy" wrote in message
 
That's not really very helpful. I thought it was fairly self-evident from my
question that I was not blaming the .net framework for my problem but rather
I would some help understanding why it works the way it does so I can use it
more effectively.
 
Back
Top