Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2007

Tip: Looking for answers? Try searching our database.

Get LOGON USER name in .NET 2.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brad King - 23 Feb 2007 21:53 GMT
I recentlly converted some web services to 2.0. So far everything has worked
great with the exception of one of the functions in an AD service.

the following code:
string sUser = HttpContext.Current.Request.ServerVariables["LOGON_USER"];

Worksk fine if debugging in VS 2005 but when I publish to the server. An
empty string is returned. I have tried to catch an error and does not appear
to be one.
Norman Yuan - 25 Feb 2007 04:57 GMT
string sUser = HttpContext.Current.User.Name

>I recentlly converted some web services to 2.0. So far everything has
>worked
[quoted text clipped - 7 lines]
> appear
> to be one.
Brad King - 27 Feb 2007 16:35 GMT
This does not work for me

'System.Security.Principal.IPrincipal' does not contain a definition for
'Name'   

> string sUser = HttpContext.Current.User.Name
>
[quoted text clipped - 9 lines]
> > appear
> > to be one.
Adam Wayne - 02 Mar 2007 05:18 GMT
What form of authentication are you using in your application? Forms?
Windows? What is the IIS application configured to use? Anonymous? Integrated?

> This does not work for me
>
[quoted text clipped - 14 lines]
> > > appear
> > > to be one.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.