DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 3 Aug 2007 14:17:54 +0530,    posted on: microsoft.public.dotnet.myservices        back       

Thread Index
  1    SenthilVel


windows Service Identity.Name...--Help Needed   
Hi ,
i have a windows Service which is running with the Local System account.

This windows service will be strarted\stopped by a ASP.Net web Application.

i also wanted to know the Logged in user name whenever my Service is 
started\ stopped .

i am using this :
Thread.CurrentPrincipal = new 
WindowsPrincipal(WindowsIdentity.GetCurrent());

struserName = Thread.CurrentPrincipal.Identity.Name;

when i Deploy my windows Service in my servers - win 2003 , i always get the 
Logged in user name as -- NT ADMIN .. but i am expecting the logged in user 
name of that 2003 machine..

any reasons why Thread.CurrentPrincipal.Identity.Name gets NT ADMIN always 
??

any help much appreciated !

Thanks

Senthil
Date:Fri, 3 Aug 2007 14:17:54 +0530   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us