default value for LoginUrl

G

Guest

I have read that when using Forms Authentication, if you do not specify a
value for the LoginUrl attribute it defaults to default.aspx.

However, to test this, I create an application, add a new form called
default.aspx and set up forms authentication. When I run the program, the
exception thrown says that login.aspx cannot be found.

Why didn't it look for default.aspx?
 
S

Siva M

MSDN documentation for FormsAuthentication.LoginUrl says the default value
is login.aspx.

Please refer to
http://msdn2.microsoft.com/en-us/library/system.web.security.formsauthentication.loginurl.aspx

I have read that when using Forms Authentication, if you do not specify a
value for the LoginUrl attribute it defaults to default.aspx.

However, to test this, I create an application, add a new form called
default.aspx and set up forms authentication. When I run the program, the
exception thrown says that login.aspx cannot be found.

Why didn't it look for default.aspx?
 
G

Guest

I am using VS 2003 (The LoginUrl property is new to 2.0) and specifying this
in my web.config file, not in code. Therefore, if I do not specify the
LoginUrl attribute in my web.config file, where should it take me?
 
S

Siva M

Yes, LoginUrl property was introduced in .NET 2.0. Nevertheless, the default
value for the loginUrl attribute (in web.config) is login.aspx in 1.1 too.


I am using VS 2003 (The LoginUrl property is new to 2.0) and specifying this
in my web.config file, not in code. Therefore, if I do not specify the
LoginUrl attribute in my web.config file, where should it take me?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top