q; redirect to login.aspx

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a login.aspx in my application and I need to make sure all the users
go though this page even if they click other apsx files in the project
login.aspx should show up. How can I do this?
 
If using FormsAuthentication, then use the logingUrl in your web.config
like so:

<forms name=".FormsAuth" loginUrl="path/to/login.aspx" />

hope that helps!

Sean
 
hi Jim,
use Forms Authentication on your web site. any users will then be directed
here to login before they can access any .Net resources in your project.
look up the SDK for more info on using Forms Auth.

if you really didn't want to use forms authentication for some reason, then
you could intercept the Application_BeginRequest method in global.asax and
check for some criteria (set by you) which would indicate if the user is
allowed to enter the site.

i hope this helps.
tim
 
I have login screen that checks the user against database, can you give me
example how I can use FormsAuthentication.
 

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

Back
Top