472,784 Members | 900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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 2199
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
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
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
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
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
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
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
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
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
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
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.