473,472 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How ASP.NET find Login page?

In VS2005, I create a ASP.NET website project.One page named
Default.aspx with LoginView and LoginStatus controls; and one page
named Login.aspx with Login control in it. After setup of users, I
press Ctrl+F5, IE window is popped up, redirect to Login.aspx page ask
me to input username and password. This works fine.

I am wondering, how does ASP.NET know to redirect to Login.aspx from
Default.aspx? I renamed Login.aspx to something else, and it still
works fine.

I add another page named AnotherLogin.aspx with Login Control too.
But, Default.aspx doesn't redirect to AnotherLogin.aspx, but to
original Login.aspx. What's the connection between Default.aspx and
Login.aspx? How to configure it?

Thanks

Apr 21 '07 #1
2 1976
I did some investigation and found that loginurl can be configured in
web.config, like
<system.web>
<authentication mode="forms">
<forms loginUrl="AnotherLogin.aspx"></forms>
</authentication>
</system.web>

However, without this configuration, the loginurl is Login.aspx. I
even tried to rename Login.aspx to ABCLogin.aspx, then loginurl is
ABCLogin.aspx. But, I cannot find any default config in the project's
folder. Or, just guessing, VS2005 make the first created login page as
default?
On Apr 21, 12:47 pm, Morgan Cheng <morgan.chen...@gmail.comwrote:
In VS2005, I create a ASP.NET website project.One page named
Default.aspx with LoginView and LoginStatus controls; and one page
named Login.aspx with Login control in it. After setup of users, I
press Ctrl+F5, IE window is popped up, redirect to Login.aspx page ask
me to input username and password. This works fine.

I am wondering, how does ASP.NET know to redirect to Login.aspx from
Default.aspx? I renamed Login.aspx to something else, and it still
works fine.

I add another page named AnotherLogin.aspx with Login Control too.
But, Default.aspx doesn't redirect to AnotherLogin.aspx, but to
original Login.aspx. What's the connection between Default.aspx and
Login.aspx? How to configure it?

Thanks

Apr 21 '07 #2
If you use the VS tools to help set up login, it will place the config
element for you. It will also watch page name changes and adjust config
accordingly. You can "trick" it and mess things up, if you try reallly hard.
Fortunately, it is a simple matter of manually configuring through the
config file. ;-)

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
"Morgan Cheng" <mo************@gmail.comwrote in message
news:11**********************@q75g2000hsh.googlegr oups.com...
In VS2005, I create a ASP.NET website project.One page named
Default.aspx with LoginView and LoginStatus controls; and one page
named Login.aspx with Login control in it. After setup of users, I
press Ctrl+F5, IE window is popped up, redirect to Login.aspx page ask
me to input username and password. This works fine.

I am wondering, how does ASP.NET know to redirect to Login.aspx from
Default.aspx? I renamed Login.aspx to something else, and it still
works fine.

I add another page named AnotherLogin.aspx with Login Control too.
But, Default.aspx doesn't redirect to AnotherLogin.aspx, but to
original Login.aspx. What's the connection between Default.aspx and
Login.aspx? How to configure it?

Thanks
Apr 21 '07 #3

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

Similar topics

5
by: Simon | last post by:
Hi, I have a Login.php page that logs the user in and out. I has two forms within the page, (depending on what we are trying to do), either one to log in or out. The form calls itself using a...
2
by: Tom Loach | last post by:
Our system administrator set up an NT server group in order to allow our users to login to our application via https to our sql server. The group appears as a User in SQL Server when you look at...
1
by: Tom Jones | last post by:
Hi, I am using the HttpWebRequest and HttpWebResponse classes to pull information from a web server on the internet. I have an account on one of the webservers that I need to log into...
3
by: NWx | last post by:
Hi, I have a ASP.NET application using forms authentication Default page is default.aspx, and login page is login.aspx As I perform authentication in Login page, I want to update a log table...
11
by: David W. Simmonds | last post by:
I have a form that will prompt for a user name/password. In VS.NET, I have the protected form in a folder named Admin. I have a Web.config file in that folder as well. It contains the following...
4
by: nicholas | last post by:
Hi, Got an asp.net application and I use the "forms" authentication mode defined in the web.config file. Everything works fine. But now I would like to add a second, different login page for...
0
by: muder | last post by:
I have a standard Login ASP.NET 2.0 control on a login Page, a LoginName and LoginStatus controls on the member's page. once the user login successfully I am redirecting the user to Member.aspx...
6
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
3
by: satishknight | last post by:
Hi, Can some one tell me how to change the validation sequence for the code pasted below, actually what I want it when any one enters the wrong login information (already registered users) then it...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.