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

B

Big Charles

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?
 
C

Cowboy \(Gregory A. Beamer\)

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!
*************************************************
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top