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...How to get domain user's first name, last name and e-mail address
I am able to retrieve the domain/user ID by setting <authentication mode="Windows"/> in the Web.config file, and with the following code in my Default.aspx.,cs page:
string strName = Request.ServerVariables["AUTH_USER"];
I would also like to retrieve the users first name, last name and e-mail address from their domain profile, if possible. Can anyone help me with a code example? I'm somewhat new to C#/.NET/OOP so if you have it in "C# for Dummies" format, I would be very thankful!
Thanks in advance for any help that i...Getting the user's first and last name
I'm using the login control and I'm getting the username without a problem (<asp:LoginName ID="LoginName1" runat="server" />) but how do I get the user's first and last name (or any other information)? I do have the user's information stored in a database. I'm not utilizing Profile schema either.Thanks.
Use the MemberShip class to get the user information.
http://msdn.microsoft.com/en-us/library/tw292whz.aspx*** If this post helps you, then Mark this post as Answer ***...Getting user's first and last name from AD
I have an intranet site running with windows authentication, and I would like to greet the user with their full name. What's the best way to find the first and last name values entered in the AD database?I guess it needs a DirectorySearcher object, but my AD knowledge stops there.Thanks,JohnJohn HogeSeaEagle.com Inflatable Boats
You can get the current user's details by parsing their domain name and performing a search for it. Here is an example - 'sn' and 'givenName' are last name and first name respectively.<%@ Assembly Name="System.DirectoryServices, Version=1.0.5000.0, Cultur...Get user's first and last name from Active directory.
Hi,I'm trying to get user's first and last name from AD to display in my welcome page. I'm using Visual Studio 2005. In my login page I have login control and I'm using forms authentication against LDAP.So I don't have to store user data. Any help would be greatly appreciated.
DirectoryEntry objOU = new DirectoryEntry(",%20DC=domain,%20DC=something,%20DC=net%20or%20com>/">LDAP://CN=your user name, OU=users group>, DC=domain, DC=something, DC=net or com");
string name = objOU.Properties["givenName"].Value.ToString();
string...Groupwise user name in pace of first and last name
We meet a strange behaviour with groupwise client ( windows ) in caching
since we've chosen "caching mode", Return notification ( popup ) for
tracking information display "groupwise username" in place of
Anyone experienced this case ?
It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.
Has your problem been ...Question about 18.104.22.168 usernames, last name first or first name first
I have been looking through all the settings on groupwise and i am yet
find how to change the names from last name first to first name first.
account happens to say Phil Halbasch where others says Halbasch, Phil.
anyone knows of that secret setting to modify this it would be
I figured it out, sorry for wasting ur time :)
Click Address book
Click View tab and then name format
"Phil Halbasch" <email@example.com> wrote in message
> I have been looking th...Users with same first and last name
Our email addressing is first initial and full lastname @ domain.com.
We have students who have the same first name, so we use first 2
initials of first name and full last name @ domain.com. The problem is
sometimes we get errors on the user that has the first initial and full
lastname email address stating that there is already a user with that
email address. I can't figure out why it does that or how to fix it.
We are running GroupWise 7.03 on Netware 6.5 sp5.
-----------------------------------------------------------------------...Search by first/last name or just last name?
I have a simple page that searches an access database by first and last name. How would I set it up to search by the first and last name OR just the last name.I tried this:where ([player.first_name] LIKE '%' + ? + '%') and ([player.last_name] LIKE '%' + ? + '%') or ([player.last_name] LIKE '%' + ? + '%')but it didn't work. Thank you.
You just about got it, you just need a couple more parens, like this:where (([player.first_name] LIKE '%' + ? + '%') and ([player.last_name] LIKE '%' + ? + '%'...DropDown List: Want to concatenate two fields so it displays "Last Name, First Name" in the ddl text to the user. Sproc for datasource
I know I can do this if I use a LINQ data source access the tables directly with a LINQ query, and I know I could modify my stored procedure to return a Last_FirstName field that would already have the name formatted as “Last, First” but I want to know if I can make the drop down list itself deal with this?
I have a sproc that returns EmployeeID, FirstNm, LastNm.
I want the drop down list to display “LastNm, FirstNm” and of course use the EmployeeID as DataValueField.
Is there any way I can concatenate the Last and First together with VB.NET when the sproc ret...Can not get user name from HttpContext.Current.User.Identity.Name
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 the user name of a process in vb.net?
Could anybody tell meHow to get the user/owner name of a process in vb.net?The reason I need it is because I developed an application,which I will put on the winnt enviroment, I want to allow multiple instance.but only allow one single instance per user.I am using Application.Run(MyMainForm) to start my applicationThanks,Joseph...User's first and last name
What would be the simplest way to add the user's first and last name to the registration process?I noticed there was a comment column in membership user. Would it be easy to add xml document to this field?Thanks!Rob
you can check the link below:Extend the MembershipUser class http://forums.asp.net/43/ShowForum.aspx...Extracting first name, last name, middle name from a string
I have a variable in a stored procedure that puts the first
name, last name, and middle name in the format LastName,
FirstName MiddleName. (I cannot just used the columns
firstname, lastname, etc. as they are not available in the
stored proc.) I am trying to split this up so that it reads
LastName, [new line] ~r~n FirstName + MiddleName. Any
suggestions on extracting this into that format?
Any help greatly appreciated.
I am working with Infomaker 6.0 and Windows 2000
Actually, it's just the format LastName, FirstName
so I would only need to search for the comma an...