473,503 Members | 12,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Specify login page other than Login.aspx

Hi,

I am trying to learn new membership/roles features of ASP.NET 2.0.
When we setup forms authentication and specify deny users="?" under
authorization, the application asks for login.
My problem is: It always looks for Login.aspx page by default. What if
the name of my login page is different than Login.aspx? Where do I
specify the name of my login page?

thanks.

Oct 19 '06 #1
2 2227
You need to set the loginUrl attribute in your web.config, e.g.

<configuration>
<system.web>
<authentication mode="Forms">
<forms
loginUrl="~/myLogin.aspx"
</forms>
</authentication>
</system.web>
</configuration>

More info here:
http://msdn2.microsoft.com/en-us/library/1d3t3c61.aspx

--
Chris Fulstow
MCP, MCTS
http://chrisfulstow.blogspot.com/
vikramp wrote:
Hi,

I am trying to learn new membership/roles features of ASP.NET 2.0.
When we setup forms authentication and specify deny users="?" under
authorization, the application asks for login.
My problem is: It always looks for Login.aspx page by default. What if
the name of my login page is different than Login.aspx? Where do I
specify the name of my login page?

thanks.
Oct 19 '06 #2
Chris,

Thanks for your help. It worked nicely.

Chris Fulstow wrote:
You need to set the loginUrl attribute in your web.config, e.g.

<configuration>
<system.web>
<authentication mode="Forms">
<forms
loginUrl="~/myLogin.aspx"
</forms>
</authentication>
</system.web>
</configuration>

More info here:
http://msdn2.microsoft.com/en-us/library/1d3t3c61.aspx

--
Chris Fulstow
MCP, MCTS
http://chrisfulstow.blogspot.com/
vikramp wrote:
Hi,

I am trying to learn new membership/roles features of ASP.NET 2.0.
When we setup forms authentication and specify deny users="?" under
authorization, the application asks for login.
My problem is: It always looks for Login.aspx page by default. What if
the name of my login page is different than Login.aspx? Where do I
specify the name of my login page?

thanks.
Oct 20 '06 #3

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

Similar topics

2
5075
by: TaeHo Yoo | last post by:
In my current web.config, I have these lines ----------------------------------------------------------- <authentication mode="Forms"> <forms name="frmAuthentication" loginUrl="login.aspx" />...
2
1907
by: Justin | last post by:
I am using forms authentication and I need to specify a different URL that the login page redirects to after successful login. e.g. admin/default.aspx not default.aspx Thanks, Justin.
12
6941
by: ACaunter | last post by:
Hi all, I was wondering how i could write some code which would automatically open the Login Page once the session has expired? -- AdamPC@hotmail.com
13
2377
by: Crouchie1998 | last post by:
What's the simplest way to create a login page in ASP.NET & VB.NET? Awaiting your reply, Crouchie1998 BA (HONS) MCP MCSE
0
5243
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...
2
1981
by: Morgan Cheng | last post by:
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...
0
885
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I have a two pages in the locations ~/Folder1/LoggedIn.aspx and ~/Folder2/Services.aspx. Both folders have a web.config file that redirects unauthenticated users to ~/Login.aspx. When a user is...
0
934
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I have a two pages in the locations ~/Folder1/LoggedIn.aspx and ~/Folder2/Services.aspx. Both folders have a web.config file that redirects unauthenticated users to ~/Login.aspx. When a user is...
0
1320
by: daokfella | last post by:
I have a Login.aspx page that takes care of all my login procedures (validation, lockouts, password change requirements, password retrieval, etc.) It works like a charm. However, now I'd like a...
0
7212
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
7296
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
7470
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
5604
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
5026
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
3186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1524
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 ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
405
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...

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.