Based on the docs, Environment.Username gets the user that started the current 
thread. If you are doing any type of impersonation this may possibly be off. 
WindowsIdentity.GetCurrent().Name could work in that case.
But for a webservice, HttpContext.Current.User.Identity.Name  would also take 
into consideration the calling user context (if ntlm is used for ex). Id try 
that first. 

-----Original Message-----
From: Ryan Reid <[EMAIL PROTECTED]>
Sent: Tue, 25 October 2005 20:34:06
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Determining who I'm running as in Web Service?

Won't Environment.UserName do it?

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Andrews
Sent: Tuesday, October 25, 2005 1:30 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: [ADVANCED-DOTNET] Determining who I'm running as in Web Service?

Guys,
 Is it possible to determine who I'm running as in a web service?
 I've got a web service that's running that's calling a COM component. When
I run the web service from the test harness that's created by default by
Visual Studio, it works fine. I adjusted the Component Services My Computer
properties and added ASP_NET to both Access and Launch Activation
properties. This allowed the web service to run just fine in the test
environment.
 Now when I call it from my web application, I get the same error "Can't
create ActiveX Component" from the .NET Framework.
 Any ideas?
 Thanks,
Mike

===================================
This list is hosted by DevelopMentorR  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

-------------------------------------------------
 Sent using http://www.DWmail.net, a free service
 Check your email [any email, anytime, anywhere]
-------------------------------------------------
Disclaimer: DWmail.net is not responsible for the content sent via it's 
services.  Additional header information is included regarding the source of an 
email.  If you believe an email is junk you should look for the 'Originating 
IP' message header

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to