CreateUserWizard and Forms Authentication w/Roles

G

Guest

I have a VS2005 project on a winxp pro with IIS installed on it. I am using a
SQL Server source for my membership and roles information.

I created a Login.aspx page, a Default.aspx, a Thankyou.aspx page and a
AddUser.aspx page.

The Login.aspx page has a login control. No changes other than saying the
destinationURL is ~/Default.aspx.

THe ThankYou.aspx page just has text saying thank you.

The Default.aspx just has a link to Adduser.aspx.

The AddUser.aspx page just has the CreateUserWizard control on it. Turned
off the requireemail option and set the ContinueDestinationURL to
~/ThankYou.aspx.

Forms Authentication for the site has been turned on. I have denied
anonymous users. Everything works fine at this point, the progession works as
expected:
Login.aspx->Default.aspx->AddUser.aspx->ThankYou.aspx.

Now I upgrade the site to require that only users of a certain role can
access the site and pages within. I add access rules to the root directory of
the site to (in order)
Allow users of role X
Deny All Users
Deny Anonymous Users

This is where the AddUser page starts messing up.

Login.aspx->Default.aspx->AddUser.aspx->Login.aspx?ReturnUrl=%2fTest%2fAddUser.aspx

After the user is created and you press the continue button, it goes to the
login screen. Why is this? Is it a bug with CreateUserWizard?
 
G

Guest

Guy,
Not really, I think what's happening is you are getting a new user but the
CreateUser wizard isn't actually authenticating the new user. So you would
either need to do that programmatically, or leave it the way it is, possibly
with an explanatory message to the new user.
Peter
 
G

Guest

Oh, I see.

The real purpose is for an admin of a site to create other users for the
site. To summerize what you are saying: THe authenticated user who used the
CreateUserWizard page is being replaced with the user created by the
CreateUserWizard but the new user isn't really authenticated.
 
G

Guest

After reading your message and realizing that the CreateUserWIzard was trying
to login the new user, I found the LoginCreatedUser property of the control
(which I didn't see before) and turned it off. The form works perfectly.

Thank you.
 
G

Guest

Yes, and thank you for reminding me! Also, let us not forget that often
developers use the create user wizard so that if I visit your site and I
decide I want to "become a member" it would work in that modality as well.
Peter
 

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,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top