.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How to get Clients Machine User credentials Username and Domain

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :ASP.Net

I am trying to retrieve the loged in userName and Domain of the Clients machine. 

 string IP = (string)Request.ServerVariables["REMOTE_ADDR"];

 string IP = (string)Request.ServerVariables["REMOTE_ADDR"];

   Able to retrieve the Clients Machine IP but need to get the Remote Computer User details.


View Complete Post

More Related Resource Links

The specified user account "domain\username" is a local account. Local accounts should only be used

HI Im getting this error when trying to set a new Service account for my performance point services. SharePoint is installed in a single server enviroment. I can´t get a new service account configured and I think this is causing my server to run slowly. Any help would be highly appreciated thanks

display of username in "domain/user" instead of "surname givenname"



we have a Sharepoint server 2010 running and at the top right of the website the username is showing like domain\username.

The same thing in documentlibraries and lists.

How can I change this to "surname givenname"?


I have configured a userprofilsync with our Domaincontroller and all of our users can be found in the Sharepoint Central Admin User Profils section with the correct Name.



How to authenticate local user usin ldap or non domain authentication



I created one application, and I need to authenticate local user. This user is the user who is login to his/her Personal Computer.. Main thing his that he/she does not in any DOMAIN... I want NON-DOMAIN authentication.. any how.... please help...

System.Data.SqlClient.SqlException: Login failed for user . Reason: The account is disable


Hi All,

Thank you for advance.

I created a widows service for mail schedule with c#.net and sql server 2005 and it is working fine for past one year.

now sometimes i am getting the "System.Data.SqlClient.SqlException: Login failed for user '<UserName>'. Reason: The account is disabled." error.

then i restarted the windows service manually and working.

what is the problem in my sql server connection and how to fix that issue?

Login Failed for User "XXX" when login from a ETL machine for Sql Server 2005 SP2

Hi Guys, I have a straange issue with Login Failed errors coming intermittently probabaly twice in a week: I have a  production Database on Server A and we have Two ETL servers on Server B and Server C. Sometimes when the ETL's (SSIS) run from SERVER B I do get an error stating login failed for user "XXX" this user is a sql server user. And when I run the same package from Server C it does not give any error and runs smoothly. Both the packages uses the same configuration file to connect to the same database with the same user credentials. Also this error is not a frequent error but comes along once or twice in a weeK. Can anyone shed some light on this and let me know the root cause. Both servers have the same sql client version as well. All servers mentioned above are 64 bit windows 2003 servers. Raju

Changing user domain

Hi, We have our sharepoint 2007 entreprise farm importing users from two different AD. Let's say 'potato' and 'orange'. We have mysite creation activated in our farm. We have to change one user from potato to orange. The user domain is not in the mysite url of the user. We have http:\\...\personal\fLastName. Questions: 1- How can I change potato\fLastName to orange\fLastName?    We wante to disable potato\fLastName AD account and then create orange\fLastName.     Does it impact profile AND mysite? 2- What are the impact on document history?   Will I still be able to see what potato\fLastName changed or it will show orange\fLastName? Thanks.

Cannot create user: server cannot determine if it is member of a domain

Hi, An instance of our 2008 SP1 SQL Server is running on a computer that was removed from it's domain and then re-added. Now, when I want to create a new login in Management Studio via the nodes Security/Logins, selecting "New Login", entering DOMAIN_NAME\USER_NAME as login name and then click "Search", I get an error message (in German) "Das Programm kann das erforderliche Dialogfeld nicht öffnen, da nicht ermittelt werden kann, ob Computer "COMPUTER_NAME" einer Domäne zugeordnet ist. Schließen Sie dieses Dialogfeld, und wiederholen Sie den Vorgang". Translation: "The program cannot open the required dialog, as it cannot be determined if computer "COMPUTER_NAME" is assigned to a domain. Close this dialog, and repeat the process." But closing the dialog and repeating as suggested does not help. Even restarting the SQL Server service and re-connecting in Management Studio did not help. I keep getting this message. I found, however, that just entering the domain and user name and then clicking Ok seems to add the user. Anyway, it is irritating to get this error message when clicking "Search". How can I tell the engine that the computer is really member of the domain again? Frank

Display Full Name in SharePoint instead of Domain\Username

My SharePoint 2010 server started displaying the users with the Domain\Username standard instead of using Full Name (as it did up to yesterday). This in all pages of the sites (persmission settings, document libraries, tasks, etc.) Does anybody knows how to force SharePoint to display users with the "full name" standard? Thank you.Plo

People Picker gets error when selecting user from a trusted domain(one way forest trust)

  Hello all,   Our current setup is SharePoint 2010 Foundation server in one external forest(Trusting forest), and trying to have users in a separate internal forest(Trusted forest) access the site. The external forest's DC and SharePoint server are in a DMZ separated by a firewall with the internal forest's DC and users. A one way transitive forest trust was successfully created and has been validated. On SharePoint, we're ran the sts commands to set the setapppassword as well as the peoplepicker-searchadforests adding the domain that the SharePoint server is in, as well as the trusted forest. An iisreset was issued after running these commands. In SharePoint, we can then search for users from the trusted domain, and select the users in the Select People page, but when hitting the final Ok, an error is received: An unexpected error has occurred in which a correlation ID is provided. Reviewing the SharePoint logs we find the following: <!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520081665 -1073717157 41 0 66047 0;} /* Style Defin

"The username is invalid. The account must be a valid domain account."

So I'm at the SharePoint Products Configuration Wizard, I put in the Database Server and name then put in the username and password. It just keeps saying this message after I hit the Next button! :   The username is invalid. The account must be a valid domain account.   What's wrong?

Import user profile from another domain active directory

Hi, I have SharePoint 2010 running on DomainB andwe have corporate users on DomainA. i need to import users from both domainA and DomainB. I am able to import users from domainB and not able to import users from DomainA. I made a successful connection to both Domain A Ad and DomainB AD in SharePoint 2010 user profile synchronize connections. I am able to sync users only from DomainB (SharePoint 2010 running on domainB) and not able to synchronize profiles from DomainA (outside domain). Is there any additional configuration I need to do. Please help me on this issue. Thanks, Ratna

User Profile Service - "The specified user or domain group was not found"

Hi there, I had configured the User Profile Service and all was working well (Syncing with AD etc.). However, something has gone wrong. The services still appear to be running; both Forefront Identity Manager services are running, and the services show as 'Started' in Central Administration. The 'My Profile' and 'My Site' options have disappeared though, and browsing to the My Sites page results in an error (Could not load user profile). To make matters much worse, it seems to have also broken the Central Administration site. If I try and go to 'Manage Service Applications' I get another error (The specified user or domain group was not found). This error seems to come up on around half of the pages on the Central Administration site. Looking up the error (abb6b174-0f71-413a-a27a-41cdc87b66d0) in the logs I find this: 09/06/2010 15:35:45.44  w3wp.exe (0x0868)                        0x06A0 SharePoint Portal Server       User Profiles                  cm6y High     User Profile Application Proxy failed to retrieve partitions from User Profile Application: Microsoft.Office.Server.UserProfiles.UserProfileA

Hyphens in domain names get trimmed from account names in user profiles

We've been trying to launch an internal deployment of SharePoint 2010 MySites but we've run in to a problem with the user profile import. We've reviewed all of the relevant guidance and have been able to complete an import successfully, but all of the characters before a hyphen in our domain name are getting truncated from the imported username. To illustrate:   PREFIX-BLAH\tristan.watkins becomes BLAH\tristan.watkins after it is imported. When I log in, a new user profile is created for PREFIX-BLAH\tristan.watkins and all of the imported profile data is useless, since it is associated with a non-existent BLAH\tristan.watkins.   I'm assuming this is an issue with the beta version of Forefront Identity Manager 2010 that shipped with SharePoint 2010 beta, but I can't find any information suggesting this is a known issue and for all I know it may actually be a SharePoint issue rather than a problem with FIM. For what it's worth, this was not a problem in SharePoint 2007. Can anyone help?

SQL Error with Login: Login failed for user 'NT AUTHORITY\SYSTEM'. [CLIENT: ]

<!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {mso-style-noshow:yes; mso-style-priority:99; color:purple; mso-themecolor:followedhyperlink; text-decoration:underline; text-underline:single;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:612.0pt 792.0pt; margin:70.85pt 3.0cm 70.85pt 3.0cm; mso-header-m

Oulook.exe hangs when Domain User launches application through Interop windows 2003 sp2

Hello,I have a problem using Interop.Outlook on a win2k3 sp2 server. For windows 2003 version prior to sp1 i could use a specific identity for application pool and i had no problems launching outlook.User was authenticated and delegated correclty. With sp2 the Outlook.exe process is launched by the domain user specified as identity (also visible on Task Manager Processes) but no exception or time out is ever thrown.  The only way that i can make this to work is when i set impersonate=true in web config (without setting userName and password as this would have exactly the same affect with the application pool identity).Are there any permissions that i can set to overcome this?Help would be greatly appreciated. Normal 0 false false false EL X-NONE X-NONE Appreciate

Logon to SharePoint 2010 requires \. Why?

We've installed a fairly large number of small SharePoint 2007 environments. All of these have had their own Active Directory, specified to <domainname>.local. These have been accessible from Internet, and have simply had a external DNS pointingwww.<domain>.com to the server.  In these SharePoint 2007 environments we've used Windows Authentication, and logging on has simply been a procedure of specifying username and password. It has worked just fine. However, in our first SharePoint 2010 environment, we're encountering odd problems. We use here NTLM authentication, and  domain name is <domain>.local. The domain name used in Internet iswww.<domain>.com, which points to the SharePoint 2010 environments frontend server. We'd like to login to the SharePoint environment with simple <username> and password, but it fails. We have to explicitely specify <domain>\<username> and then password to login. Why doesn't this work, and is there any relatively easy way to fix this without disturbing the environment? From logon attempts using simply username, these events appear in the Security event log: Log Name: Security Source: Microsoft-Windows-Security-Auditing Date: 7.5.2010 13:15:01 Event ID: 4625 Task Category: Logon Level: Information Keywords: Audit Failure User: N/A Computer: <COMPUTER>.<

User Profile Synchronization: Name of user account / id uses wrong Netbios domain name?!

I've got an interesting situation: I've got a domain e.g. FOOBAR.FI. The Netbios domain is due to historical reasons BARFOO. When I use UPS to import accounts from the FOOBAR.FI domain, the user account names in SharePoint are given the id of FOOBAR\<useraccount>. This works so and so. Users are identified and My Sites is fine. However the organizational chart and other fields where you can specify another user don't work as they should. If the manager is specified from AD, the organizational chart works. However, if I edit a profile and check the manager, it's in the form of FOOBAR\<useraccount>. SharePoint highlights this and a tooltip says that the account cannot be found. As a suggestion, it gives BARFOO\<useraccount>, which is found from the AD. All fine and dandy, until you check the organizational chart, which turns out to be empty at this point. This is because in SharePoint there's no user with the name BARFOO\<useraccount>, but only those FOOBAR\<useraccount> users who've been imported from the AD. So bottom line question is: How does UPS select and set the user account name?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend