creating a new user logs out the current user

Hi everybody,

I am developing a web application, currently I am working on the security aspect of the web app. The problem I am having is when I create a new account (when I sign in as an admin user) using CreatNewUser Wizard, a new user is created and it automatically logs out the current user(Admin) and get itself  logged in.

Could anybody help me out here.

Thanking you in anticipation.

Regards.

0
walnut
5/3/2006 2:28:17 PM
asp.net.security 27051 articles. 1 followers. Follow

3 Replies
942 Views

Similar Articles

[PageSpeed] 51
Get it on Google Play
Get it on Apple App Store

There is a property on the <asp:createuserwizard> control called "LoginCreatedUser" (this is a Boolean) that allows you to control whether a newly created user is automatically logged in.  Setting this to false should give you what you are after.

You might also want to check out these two samples: http://weblogs.asp.net/scottgu/archive/2006/01/09/434925.aspx They provide an admin UI for managing users/passwords.

Thanks,

Scott

0
ScottGu
5/4/2006 12:19:33 AM

Hi Scot,

Thank you very much for your help. The problem has been resolved now, Changing property "LoginCreatedUser" to false did the trick as you mentioned.

Thanks again for providing link to the samples.

Regards,

 

 

0
walnut
5/4/2006 11:37:37 AM

Hi Scot,

May be you could help me with other problems that I am having at the moment.

I already started new threads for that, if you could please have a look at

http://forums.asp.net/thread/1275955.aspx   and

http://forums.asp.net/thread/1275984.aspx

Thank You.

Regards,

0
walnut
5/4/2006 2:47:18 PM
Reply:

Similar Artilces:

Current User Logs out after creating new user.
Hi,  I am using the asp.net membership provider for managing users in my application. I have created the required database in SQL server 2005. I am using the standard membership controls provided. (Login control, CreateUserWizard control etc.) . As per business logic of my application, the user do not create their account themselves. The Admin user creates them instead. For user creation, I have created a page with the CreateUserWizard control. I have made necessary membership settings entries for the web.config file. So, the user gets created without any line of code. But...

Custom Create New User automatically logs-in New User
Hi. I've written a custom Create New User form that allows Admins to add new Users. The problem is it also logs-in the new User.  I realize the CreateUserWizard has a property (LoginCreatedUser); however, I'm not using the wizard. Can't find a way to programmatically NOT login a new User.  Does anyone know how to turn this off?  Here's my code: MembershipUser newUser = Membership.CreateUser(this.txtUserName.Text, this.txtPassword.Text, this.txtEmail.Text, this.txtQuestion.Text, this.txtAnswer.Text, false, out status); Thank you. -Nicole are you using the production ...

I use an CreateUserWizard control to create new user account. Every time I create a new account, my logined account will change to the new one. How can i keep my current account after creating the new
I use an CreateUserWizard control to create new user account. Every time I create a new account, my logined account will change to the new one. How can i keep my current account after creating the new account? Simply set the "LoginCreatedUser" property of CreateUserWizard control to FALSE!  ...

Retrieving the new user ID after details have been created with Create New User Wizard
I've got a 'create new user' wizard set up with several additional wizard pages containing extra information. This information will be stored into the database when the CreatedUser event fires. However, I need to obtain the user ID of the newly created user. How can this be achieved? Assuming the user id is an Identity field that is generated in SQL, I would return the user id as an output parameter in your stored procedure and reference that parameter in your ASP.NET code.   I believe the code to get the identity value of a newly added record is: SELECT @myoutputp...

User object (System.Security.Principal.IPrincipal) in my web service does not reflect currently logged on user.
I am using Forms authentication, 3.5 framework. I am calling a web method from a web form page; here is my problem: For some reason the User object (System.Security.Principal.IPrincipal) in my web service does not reflect currently logged on user. I know I am logged in correctly when I call the web service method (which I call using BeginX...X()). The weird thing is, I have other services whos methods DO reflect the currently logged in user (although these are called using AutoComplete extender, don't know why one works and the other does not).Please help  http://www.geneangelo...

How can i create new users without utilizing the create user wizard?
Hi, Is it possible for me to create new users without using the wizard? I am using a custom membership as i want to capture more data other than the ones which are available in the wizard. Is it possible for me to use the custom membeship create user method? If yes how can i call it ? What should i be giving the button_click event of my webpage where i capture the data? Thanks in advance Prady  You can call the CreateUser methods directly. They're available throughMembership.CreateUser(.....)If you have extra fields, not available in the CreateUser methods, you can add them to ...

Do not want to log in user after user is created
Hi there, By default, the aspnet membership create user wizard automatically log in user once the account is created. What is the way to bypass that? The scenario is, a current logged in admin is creating a new account and I want the admin to stays logged in instead of the newly created user.  set property LoginCreatedUser="False" of CreatUserWizard/GuruBhai Thanks guru_sarkar. I totally missed that ...

How to List out Current Log on Users
Dear All,              I want the efficent way to display Current Log on Users - Users in online.  If u store session of all user in database then u can easily get the online user by checking the session state stored in database.  Add the Login info in the database . Check this info regularly after some time interval and show on the page Thanks & Regards Sandeep If you want something you never had, do something you have never done! Try storing the online persons count in the Application State Aminhttp://3...

how to get the user id of the currently logged in user?
hi,       m develoing a site whereby employees are supposed to log in and take orders.  the users are being created thru the ASP web Administration tool and stored by default into the SQL Server Database named AspNetDB.mdf that's stored in the App_Data folder of our website. the database is created auomatically. How to display the userid as this userid is too complicated and there can be many users with the same username. You can use the Membership class to get the info about a user: Membership.GetUser() The GetUser method can also take a username as a...

Can create new user, cannot login as that user.
Using membership and roles with ASP.NET, I can create a new user and the user is inserted into the SQL login database.  I then turn around to login as that user and authentication fails. Thanks, -Nicolas- Can you provider more details? Which conrol are you using? And how do you do the login?  Zhao Ji MaSincerely,Microsoft Online Community Support“Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the th...

Our users cannot create new users with persona anymore
As posted on irc: Our users cannot create new users with persona anymore. Tried it also on the "demo" site "voo.st" but the same problem exists there. New user is detected and asked to create his password (twice). Then the login screen switches to login (no notification that an email was send). The email is received, but when the "button" is pressed, the persona site shows up with an error ("There was a problem with your signup link. Has this address already been registered?") We use persona everywhere in our product and this is a major prob...

Getting the user name of the currently logged in user
I'm writing my first custom module. Just as an experimental project I would just display information about the currently logged in user. I can get the User Id, but I don't know where to get the rest of the information. How do I get this? Hi, Just create a new UserController to get the information about one user via the method GetUser(PortalId, UserId) and store it into a UserInfo. Then you can get the rest of the information from this UserInfo [VB] Dim myUser As New UserInfo Dim myUserController As New UserController myUser = myUserController.GetUser(PortalId, Use...

Users logging in as the same user..
HI there.. I have a problem with ASE12.0 .. I have created 10 users on the database and granted everybody permissions and all.. However, it seems everybody, no matter who logs in, logs in as the same user.. For eg... I have user logins John, Alex, Alan, Steve......etc etc And i created a user group for all of them (eg developers..) However, when they log on to isql, anything that they do will be under John, no matter if it is logins John, Alex, Steve... or etc etc.. If i do a sp_who.. all the connections will be listed as John. If they create tables, all table created will ...

Thread.CurrentPrincipal in web apps //HttpContext.Current.User = new GenericPrincipal(HttpContext.Current.User.Identity, roles);
If you look at the MS App and Profile block, it does the following to create a principal for the current request. Thread.CurrentPrincipal = new ExtendedPrincipal(aGenericIdentityObject); Historically, in web apps, I've used more along the lines of: HttpContext.Current.User = new GenericPrincipal(HttpContext.Current.User.Identity, roles); However, changing this line to Thread.CurrentPrincipal = new ExtendedPrincipal(HttpContext.Current.User.Identity, roles); seems to work, too. Is setting Thread.CurrentPrincipal a more flexible mechanism than setting the HttpContext.Cur...

Web resources about - creating a new user logs out the current user - asp.net.security

Londonistan: How Britain is Creating a Terror State Within - Wikipedia, the free encyclopedia
The book encompasses a critique of multiculturalism , alleged weak policing, cultural relativism , and what Phillips calls a 'victim culture'. ...

Facebook’s Matt Kelly Describes Process Of Creating Plugin For WordPress
The plugin for WordPress launched by Facebook in June has been downloaded more than 180,000 times, and Engineer, Developer Relations Matt Kelly ...

Creating Online Ads that Drive Brand Awareness
New research shows how the creative elements of online ads impact brand awareness.

Bug - Creating a Video.Watches Action stopped working - Facebook-Entwickler
Since today executing a POST on a me/video.wacthes endpoints no longer works, it was working around 10 hours ago since then the call always returns ...

Facebook Creating Fourth-Party Privacy Rules for Facebook Connect Widget & Plugin Developers
In a recently-written post on the Facebook Developers Wiki, Facebook had added new rules for information sharing between websites that have implemented ...

The Obama campaign won by creating their own Facebook, with unique features for political campaigns.
... seen as too dangerous to nominate someone who is so thoroughly narcissistic, arrogant and dishonest. The Obama campaign won basically by creating ...

Creating A Great Startup Culture
... with any Bay Area startup these days (ping pong, beer on tap, catered lunches and Macbook Airs) – though these things are, of course, Creating ...

WIRED Creating the Nebula for iPad on the iTunes App Store
Get WIRED Creating the Nebula on the App Store. See screenshots and ratings, and read customer reviews.

Nets of freedom creating mesh networks 03.07.2013 - Flickr - Photo Sharing!
Explore Strelka Institute photo's photos on Flickr. Strelka Institute photo has uploaded 14526 photos to Flickr.

Creating the incorrigible Cartman - YouTube
"South Park" creators Trey Parker and Matt Stone were big fans of "All in the Family," a 1970s CBS sitcom. Perhaps this is why their most incorrigible ...

Resources last updated: 12/22/2015 2:07:46 PM