q; redirect to login.aspx

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?
 
S

Sean Chambers

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
 
T

Tim_Mac

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
 
G

Guest

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top