473,782 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ 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.as px with Login Control too.
But, Default.aspx doesn't redirect to AnotherLogin.as px, 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 1992
I did some investigation and found that loginurl can be configured in
web.config, like
<system.web>
<authenticati on mode="forms">
<forms loginUrl="Anoth erLogin.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.as px with Login Control too.
But, Default.aspx doesn't redirect to AnotherLogin.as px, 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.goo glegroups.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.as px with Login Control too.
But, Default.aspx doesn't redirect to AnotherLogin.as px, 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
2971
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 post method and either logs the user in our out given the information from the form. but every pages use sessions and cookies, if the user is successfully logged in then the cookies and session values are updated, (as well as MySQL).
2
12693
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 it in Enterprise Manager. That said, I can not see the users associated with the group from Enterprise Manager, but know they can login to the database. The problem is this. When we login via the web we get access to the database without...
1
7918
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 programatically. The connection is not secure (not https, etc.). The login page just has simple name & password textboxes on it. Can someone please tell me how I can programatically login using the
3
6831
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 with both successful and unsuccessful logins. As usual, client computer connects first to default.aspx, but since it isn't authenticated, it is redirected to login.aspx.
11
2972
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 section: <authorization> <deny users="?" /> <allow users="*" /> </authorization> In the root folder where the other forms are located I have a Web.config
4
2832
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 the users that go in a specific folder. How can I do this?
0
5275
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 page. The following is my machine configuration Windows XP Pro Service Pack2 IIS 5.1 SQL Server 2000 visual Studio 2005 DISABLE ANONMYOUS ACCESS IN IIS ENABLE WINDOWS AUTHENTICATION
6
3361
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 the past in other places, and while the help was much appreciated, it seemed everyone just wanted to 'theoretically' explain how to do it, but when I tried to do it myself, I couldn't login. I want to simply pass the email address and password to...
3
6226
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 has to tell then them its wrong information but currently it takes then to a next page and then tells them its incorrect information. This is tedious as every time they enter wrong they will be redirected to a different page and then they have to...
0
9639
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10143
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10076
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9939
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8964
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7486
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4040
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2870
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.