Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 5th, 2008, 04:13 PM
Registered User
 
Join Date: Mar 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with Registering users

I have am trying to set up the site so that only certain people (Admins) are the only ones that can register new users. I have successfully moved everything to the admin folder and can create new users. Here is where my problem comes in, when I go to register a new user through the Register.aspx page, it automatically logs in the user that has just been created. Since I have permissions the register page that only certain roles can view/user that page, it continues to give me an error. My question is does anyone know how to stop it from setting the person that was just registered to the person that is logged in?

Thanks in advance.


 
Old March 5th, 2008, 05:11 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Just off the top of my head: you could perhaps do a logout and redirect back to the home page. Put this in the CreatedUser event of the CreateUserWizard.

 
Old March 5th, 2008, 05:13 PM
Registered User
 
Join Date: Mar 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't really want to log a person out though. I want an Admin to stay logged in so they could create 2 or 3 users for example. Or add a user and modify another without having to log on multiple times.

 
Old March 5th, 2008, 07:39 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

In that case, you are not going to be able to use a CreateUserWizard. The CreateUserWizard is expressly designed for end users to create their own accounts.

To do this, you're probably going to have to develop a different interface that works with the MembershipProvider directly and calls its CreateUser method, which takes as parameters the name of a new user, a password, e-mail address, etc. and inserts a new user for the application into the data source; and returns a MembershipUser object populated with the info of the new user.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Registering ASCX gbrown ASP.NET 1.0 and 1.1 Professional 1 January 9th, 2007 11:57 AM
Email Registering HelpWanted ASP.NET 1.0 and 1.1 Basics 1 September 20th, 2006 04:21 PM
Registering DLL's askenkray Classic ASP Components 4 January 27th, 2005 03:05 PM
Registering a new user ssaylanc BOOK: ASP.NET Website Programming Problem-Design-Solution 4 January 9th, 2005 04:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.