Groups | Blog | Home
all groups > asp.net > december 2004 >

asp.net : Redirect visitors to registration page



<itinerantCoder />
12/21/2004 3:37:06 PM
In the authentication element, add a forms element to tell the app what form
to use for login, like this...

<authentication mode="Forms">
<forms loginUrl="Registration.aspx" />
</authentication>

Also, make sure you exclude only unauthenticated users from the rest of the
site by adding an authorization element inside your configuration element,
like this...

<configuration>
...
<authorization>
<deny users="?" />
</authorization>
...
</configuration>

The '?' represents all unauthenticated users.

<itinerantCoder />

[quoted text, click to view]
Patrick.O.Ige
12/21/2004 3:49:04 PM
Well i think itinerantCoder has givben u a detailed answer..
GDluck
Patrick

[quoted text, click to view]
John Saunders
12/21/2004 5:49:00 PM
[quoted text, click to view]

If you have Forms Authentication set up properly and if you have
Authorization set up so that the user can't access a page then Forms
Authentication will redirect the user to the login page. Is this not
happening?

John Saunders

Paul Evans
12/21/2004 10:46:30 PM
Hi,

I've set up forms based authentication. What I'm not sure how to do is
redirect visitors (who have not logged on) to the registration page, when
they request a web page they are not authorised to view.

Can anyone help me?

Thanks for your time

Paul Evans

AddThis Social Bookmark Button