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...
Problem in getting logged in user Name for ASPX page with (even with this.User.Identity.Name)
Hi friends, I am creating an application that takes current logged in user and displays on the page itself. for this I am getting the user name in PageLoad function by using this.User.Identity.Name and then storing the value in a hidden variable for aspx page. I am using this hidden variable to display the name of the user. I am using Windows authentication for this. Now problem that I am getting is that when multiple user launch the application from different machine and if they click simultaneously, name of one user appears on the paged displayed on the machine of ot...
How to get windows log-in user name using vb.net code?
Hi,
I built an asp.net web application on our companies HR system so that recruitors can post jobs. Is there a way to get the windows logged in user name using vb.net code?
This user name is using for tracking who posted the job.
Thank you.
Windows Authentication provides some options, as does forms authentication. See if you get what you need through User.Identity.Name. Take a look at:
http://www.15seconds.com/issue/020220.htmhttp://aspnet.4guysfromrolla.com/articles/120705-1.aspx
JeffPlease: Don't forget to click "Mark as Answer" on the p...
Can not get user name from HttpContext.Current.User.Identity.Name
Hi All;
I have tried to use HttpContext.Current.User.Identity.Name to get window user account. However, from debugger, for a long time ago I saw my window user name. But now, I did not see my window user name (from debugger) with the same code and same function call.
Please help. Was I doing something wrong? Or any special settings on web.config/machine.config or project to make it work??? I'm stuck
Thanks a lot
well, you have to have windows integrated authentiction enabled in IIS, IIRC.RTFM - straight talk for web developers. Unmoderated, uncensored, occasionally unre...
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 |
Hi
Please follow the link
http://forums.asp.net/thread/1702250.aspx
and raise the problem you've meet :) Good luckBest RegardsXiaoYong DaiMicrosoft Online Community SupportPlease remember to click “Mark as Answer” on the ...
How to get and pass the logged in user name from aspx.cs file to the silverlight application
I am getting the logged in user name in default.aspx.cs file
using request.Servervariables["LODON_USER"]
i am assigning this value to the hidden field in the aspx page .
This hidden field is accessed in teh silverlight project using
HTML.Document.GetElementByID("hidden").Getattribute("value")
I get the values at the debug mode .But when i deploy the application on The IIS
hidden field gives null value.
Do i need to apply any security settings in the IIS??
Ramesh DevadkarDotnet DeveloperDont forget to click “Mark as Answer...
get user name by user id
hi
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?
tanks
Are you using Active Directory? If so check out this tutorialCommunity Coder
Hi
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...
Get the User Name for a login user
Hi Guys,
How can I get the current loged in UserName in windows in MSSQL?
The problem is:
Users login into their PC (Windows Login)
Enter a URL of the intranet application
They would then be able to access the web base application (Intranet)
The web application has a string connection to make a connection to the database
I want to have a Trigger for my "products" table so if the table is modified (Insert/Update) all those changes be entered in "products_Audit" table
Now on "products_Audit" table I have a field "ChangedBy" where I want to store the windows loged...
Getting first name and last name from Windows logged in user
I'm sure there must be an easy way of getting the actual first name and last name from an Windows domain\username via the Windows Identity or Principal object, but I can't seem to figure it out. Does anyone have any examples of this?
try this: HttpContext.Current.User.Identity.Name
Thanks - tried that...it returns nothing or domain\loginName :(
Please check that on the site properties window (in IIS Admin console), in the security tab, click on the modify or edit button in the authentication and anonymous access group and make sure only the "Windows Inte...
Mining of a website to get the user names of its users
Hi,
I have to do a application in which we have to trace a website to get the user name of the uers in that website.Kindly give me idea or code to implement this.
Thanking you
If it's your website, I don't see why you would need to do this- you would know from the contents of your users database table. If it's not your own website, this is not c...
How to get user name or user ip address?
Hi to all!
I have written a little survey application for our intranet. In order to prevent users from taking the survey a second (3rd, 4th, 5th...) time, the app should detect the user name, or the ip address of the session.
Does someone know how to manage this with WebMatrix? Thanks!
Bye,
MichaelTo finish first, you first have to finish.
Sure, you can use the Request object.
Request.UserHostAddressStanley Tan
theSpoke Blog
Stanley,
thanks!
I searched the MSDN library. I found this article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/h...
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...
User.Identity.Name swaps with other logged in users
I seem to be having a problem with User.Identity.Name, never given me any problems in the past, however, i've just put a site live and for some reason, every now and then the value of Name changes to that of another user logged into the system! However, it's only for one page view! Once you view any page again, the information resets back to the original and correct user (i.e. value in .Name).
The only one bit of information i could see on google about this related to worker processes recycling.Is this possible? Could the worker process recycling end up with users being confused?
I...
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 ...