473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

q; redirect to login.aspx

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?
Sep 23 '06 #1
5 1707
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

JIM.H. wrote:
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?
Sep 23 '06 #2
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
"JIM.H." <JI**@discussions.microsoft.comwrote in message
news:19**********************************@microsof t.com...
>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?

Sep 23 '06 #3
I have login screen that checks the user against database, can you give me
example how I can use FormsAuthentication.

"Sean Chambers" wrote:
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

JIM.H. wrote:
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?

Sep 23 '06 #4
Thanks for the reply, I probably need an example.

"Tim_Mac" wrote:
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
"JIM.H." <JI**@discussions.microsoft.comwrote in message
news:19**********************************@microsof t.com...
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?


Sep 23 '06 #5
hi Jim.
read this MSDN article on using authentication. you'd be mad to just put in
some web.config values without having a basic understanding of Asp.Net
security. it's all explained here:
http://msdn.microsoft.com/library/en...rame=true&_r=1

tim
Sep 24 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: FN | last post by:
I'm using User.Identity.IsAuthenticated on all my pages (from a base class), and redirecting to a login page if not authenticated. The problem is that some pages are in subfolders and others are...
4
by: Dave | last post by:
Hi, Is there anyway to mimic forms authentication's loginUrl and RedirectFromLoginPage functionality using Windows authentication? We are developing intranet sites using basic authentication...
3
by: Tom | last post by:
Hi, I have an index.aspx page which includes top.aspx, left.aspx, main.aspx and bottom.aspx. In the left.aspx, there is a login web control - login.ascx. It keeps session of username and role...
1
by: Sospeter | last post by:
Hi Ken, I have done that but still experiencing same problem. Tried the following i.e. turning smartnavigation = false and using server.transfer as below but nothing works. Please help. ...
10
by: GreggTB | last post by:
I've got an page (LOGIN.ASPX) that receives the user's login information. During the page load, it checks the credentials against a database and, if validation is successful, creates an instance of...
3
by: William Sullivan | last post by:
Have a frameset HTML page (parent) with child .aspx pages. When each of the child pages loads, it checks to see if the user is authenticated, and if not, redirects to the login page: ...
7
by: savvy | last post by:
I able to redirect the user to the index.aspx page after every successful login, but I dont want certain pages outside the folder to have a access to general public. So if they click that...
5
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS) provided at the university I work for. Each page checks...
0
by: daonho | last post by:
Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs) Dim strPath As String = HttpContext.Current.Request.Path() Dim cookie As...
3
by: jasonheath.net | last post by:
I apologize in advance for the length of this post. I wanted to get as much detail as possible in here. We have 1 web app that contains the functionality to do some single sign-on logic. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.