Basic Security

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.
 
K

Kevin Spencer

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.
 
E

Eirik Eldorsen

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
 
C

Chris Kennedy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top