Login page won't redirect to a Register (new account) page


J

Jay

I've used Forms authentication in a number of ASP.Net
projects, but having a new problem. My Login.aspx
page has a link to a page for the registration
wizard, but won't go there when the hyperlink
is clicked. I use IE7.

For the Login.aspx page, I have a simple
Login control as follows:

<asp:Login
ID="Login1"

CreateUserText="Register"
CreateUserUrl="~/Register.aspx"

Runat="server"

/>

The Register.aspx page has a CreateUser
Wizard configured as follows:

<asp:CreateUserWizard
id="CreateUserWizard1"

ContinueDestinationPageUrl="~/Default.aspx"
runat="server"
/>

My Web.config file has the following:

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

and

<authentication mode="Forms">
<forms protection="All" longinUrl="Login.aspx" />
</authentication>

For IIS Authentication, I have Forms Authentication
enabled and Anonymous, ASP.NEt, and Basic
Authentication disabled.

On my Login page, if I click the Register hyperlink,
redirection does not occur.

Anybody see what I'm doing wrong?
 
Ad

Advertisements

G

Gregory A. Beamer

On my Login page, if I click the Register hyperlink,
redirection does not occur.

Anybody see what I'm doing wrong?

The way you have things set up, they are being directed to register and
then redirected to login, as all pages are set up as secure.

You need to make an exception for the page register.aspx so it allows all
users to hit it. Once you do this, everything will work fine.

If you put register in its own folder, and all other files in that folder
allow anon users, you can add a web config with its own authentication
section allowing *. Otherwise, you have to create a page exception section.
This page shows some examples of single pages:
http://www.informit.com/articles/article.aspx?p=27315&seqNum=4

Peace and Grace,

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

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
J

Jay

The way you have things set up, they are being directed to register and
then redirected to login, as all pages are set up as secure.


Oops, of course. My simplified example was a little extreme.
That is, I had set up all pages as secure even the
registration page. Fixes that.

By the way, I like the Microsoft article at
http://support.microsoft.com/kb/316871
("How to Control Authorization Permissions
in ASP.Net)
and had even bookmarked it earlier.

J.
 
Ad

Advertisements

G

Gregory A. Beamer

Oops, of course. My simplified example was a little extreme.
That is, I had set up all pages as secure even the
registration page. Fixes that.

Worse things have been known to happen! :)

Many times, I find the simplest answer is the one I am not thinking of. ;-)

Peace and Grace,

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

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

Childhood Cancer Sites:
 

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