468,290 Members | 2,097 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,290 developers. It's quick & easy.

How to redirect any page to Login.aspx? I tried but...

Hi,
How to redirect any page to Login.aspx? I tried writting this in
web.config

<authentication mode="Forms">
<forms name="aucoockie" loginUrl="wf_login.aspx"
protection="All" path="/" />
</authentication>

<authorization>
<allow users="?" />
</authorization>

But when I try to access:
http://localhost/MyPath/WebPage1.aspx
I can ! What I am missing to set up?

Aug 9 '06 #1
3 2085
Change this to...

<deny users="?" />

"Big Charles" <ch**********@yahoo.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,
How to redirect any page to Login.aspx? I tried writting this in
web.config

<authentication mode="Forms">
<forms name="aucoockie" loginUrl="wf_login.aspx"
protection="All" path="/" />
</authentication>

<authorization>
<allow users="?" />
</authorization>

But when I try to access:
http://localhost/MyPath/WebPage1.aspx
I can ! What I am missing to set up?

Aug 9 '06 #2
Thank you. That works partially.

If I type:
http://localhost/MyPath/WebForm1.aspx
Now I am redirecting to wf_login.aspx
However, after I login to the website typing:
http://localhost/MyPath/wf_login.aspx

if I type this on the address:
http://localhost/MyPath/WebForm1.aspx

I can access !

Winista wrote:
Change this to...

<deny users="?" />
Aug 9 '06 #3
Do you want role based access? If so, you need to set up the roles (either
the ASP.NET provider -- assuming 2.0 or a custom membership provider (you
code it)), you will have to set them up and then configure correctly.

Once you are logged in, you should be able to hit the page over and over
again.

If, instead, you mean.

1. Log in
2. Shut down browser
3. Hit page and served without login

Then, you need to turn off the persistent cookies with your
RedirectFromLoginPage() in the login.aspx page.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"Big Charles" <ch**********@yahoo.comwrote in message
news:11********************@i42g2000cwa.googlegrou ps.com...
Thank you. That works partially.

If I type:
http://localhost/MyPath/WebForm1.aspx
Now I am redirecting to wf_login.aspx
However, after I login to the website typing:
http://localhost/MyPath/wf_login.aspx

if I type this on the address:
http://localhost/MyPath/WebForm1.aspx

I can access !

Winista wrote:
>Change this to...

<deny users="?" />

Aug 9 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by PaulThomas | last post: by
3 posts views Thread by Tom | last post: by
1 post views Thread by Sospeter | last post: by
6 posts views Thread by Rudy Soto | last post: by
3 posts views Thread by William Sullivan | last post: by
3 posts views Thread by jasonheath.net | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.