How can i get the user id of the user currently logged in?
I need to get the userId of the user currently logged in. Do I need to use 'user profile' for that? I am using the database schemas installed by the aspnet_regsql.exe.
Any suggestions will be very much appreciated.
Dim user As MembershipUser user = Membership.GetUser(True) Label1.Text = user.UserName If this post was useful to you, please mark it as answer. Thank you!Regards.mimranshafiq.NET Web Developerhttp://www.dotnetclassic.com
VB:Dim usr as MembershipUser=Membership....get User ID from current user
hi, i'm trying to log database activity. therefore i need the user-id of the currently logged-in user. For the login i used the login-controls that come with VWD and set up a MS SQL Server 2000 Database for data storage. That part works fine, but i've found no way to get the id.i'd be glad for some hints.Thx, SönkeP.S.: found things linke user.identity.name and membershipuser.providerkey (or sth) - but this didn't help me.
Are you aware of where the users are stored in the database? Did you configure the personalization providers from the default? If not, open up ASPNETDB.MDF a...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?
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
Dim myUser As New UserInfo
Dim myUserController As New UserController
myUser = myUserController.GetUser(PortalId, Use...Getting currently logged in users ID
I have a table which stores user information in a different database aside from the ASPDB.Net one. This is so I can better manage the database and such. Now, I want to be able to use the UserID to link tables and so when i insert details into the database I want to be able to include the currently logged on users ID. I have tried to do a query which returns the users id and stores it on a profile parameter i added called profile.userid. But this doesnt seem to work. Any ideas on how i could better fetch the primarykey?
To get the ID of the current user logged in use t...Web page not detecting a logged in user/user not logging in
Hey guysAs it stands, I've created two web pages within my app. One is a login page which is simply a blank page with the login control dragged on top. Within this control I redirect to my second page which contains a set of asp:Panels that are supposed to hide/display depending on which user is browsing the page.I've read several tutorials and at the moment, I've installed memberships/roles using the aspnet_regsql application. I've also used the web administration tool to create an 'administrators' role and create a user which is assigned to that role. I've also ...Session problem(Previous Users log-in details are getting displayed/withheld for the current user)
we've hosted Bugzilla in windows 2000 server & it has been used by many
users at a given time.we've been getting this peculiar Session problem.ie.If
a user logs-in, the page that he visits contains the details of another user
who has just signed out from bugzilla.Any & all suggestions are welcome.
...How to Get the Currently Logged in Computer User within the Web Page
I'm creating an ASP.Net web application and the requirement is that users on our intranet ( AD-LDAP authenticated ) have the option, when first browsing to the logon page, to either be logged on through their current user account automatically, or be given a chance to log on as a different user. So the Logon page needs to be able to determine who is currently logged on to the computer. How can I do this?
I have the LDAP forms-based authentication working already.
Thanks Very Much in Advance.
Page....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 to get user data from a logged in user
I have the standard login controls from ASP.NET 2.0 on my site. Now i've added a id field from another table to the aspnet_users table as FK. Now i want to use this ID (if the user is logged in) to populate my datagrid. How can i get this ID? Erik
Check below link
Work With Membership API
HCHaissam Abdul MalakMCAD.NET| Blog |
Please follow the link
and raise the problem you've meet :) Good luckBest RegardsXiaoYong DaiMicrosoft Online Community SupportPlease remember to click “Mark as Answer” on the ...get user name by user id
i send the user ID to a page and there i wanna find the user name.
can you please let me know how to find a user name by user id?
Are you using Active Directory? If so check out this tutorialCommunity Coder
you can pass the Guid USerId to Membership.GetUser method,MembershipUser usr = Membership.GetUser(UserIDAsGuid);
string userName = usr.UserName;
// to get the current logged in username , just use HttpContext.Current.User.Identity.Name;
Regards,Anas Ghanem.Note:Please Don't hesitate to click "Report Abuse" link if you noticed som...Current User Logs out after creating new user.
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...How to List out Current Log on Users
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...creating a new user logs out the current user
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.
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 au...Users logging in as the same user..
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 ...