froms authentication loginurl not found

T

TJS

i'm having problems where the user is not correctly redirected to login page
if starting in a folder below the webroot.
in these cases, it always tries to go to /foldername/login.aspx

this is the web.config code:
....
<authentication mode="Forms">
<forms name="testAuthCookie" loginUrl="/_security/login.aspx" />
</authentication>
....
how do I reset path so it can find the "/_security/login.aspx " file ??
 
S

Showjumper

In the we.config file it needs to be <forms name="testAuthCookie"
loginUrl="_security/login.aspx" />
Note no leading slash
 
S

Showjumper

Thgsi is how mine looks. and it works. Is the underscore part of the folder
name?
<forms name=".ASPXAUTH" loginUrl="login/default.aspx" timeout="25"></forms>
 
T

TJS

thanks for the example but I'm still not getting the right outcome.

yes, the underscore is part of the folder name
 
T

TDAVISJR

You forgot the ~ in front of the /. This is .NET way of saying go to the
root of the project and start looking from there.

Before:

<forms name="testAuthCookie" loginUrl="/_security/login.aspx" />

After:

<forms name="testAuthCookie" loginUrl="~/_security/login.aspx" />
 
T

TJS

thanks, but this does not work either


TDAVISJR said:
You forgot the ~ in front of the /. This is .NET way of saying go to the
root of the project and start looking from there.

Before:

<forms name="testAuthCookie" loginUrl="/_security/login.aspx" />

After:

<forms name="testAuthCookie" loginUrl="~/_security/login.aspx" />
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top