I dealing with the next problem, I have a asp.net web project in which I have a login page, depending of the user that logs in it will be redirected to a Main Menu page, When the users inserts the user and passwords in the textboxes of the login page and clicks a log in button I save the user’s data into a Session variable in order to use it in the next pages,if I run the application from other page different to the login page the application will crash because there’s no Session variable.
My question is if is it possible to redirect to login page from web config if the Session variable is null?
I dealing with the next problem, I have a asp.net web project in which
Share
You may also want to checkout some of the built in ASP.NET authentication providers such as forms authentication as they come with the functionality you are looking for built in.
Forms Authentication Provider
With the forms authentication provider you can specify a default login page to redirect unauthenticated users to: