Hi,

Is there anyway(programatically) to find out under what
account the current application is running?

Thanks,

Yu

Re: account the App is running under by Marko

Marko
Fri Aug 29 14:09:00 CDT 2003

You may want to look at the System.Security.Principal namespace:

WindowsIdentity wi = WindowsIdentity.GetCurrent();
Console.WriteLine(wi.Name);

that gave me the name of the user (DOMAIN\USERNAME). Is this what you
needed?

marko

"Wei" <yyuuxx@yahoo.com> wrote in message
news:082201c36e4e$5c04f8c0$a001280a@phx.gbl...
> Hi,
>
> Is there anyway(programatically) to find out under what
> account the current application is running?
>
> Thanks,
>
> Yu



Re: account the App is running under by Wei

Wei
Sat Aug 30 16:20:20 CDT 2003

This is exactly what I need. Thank you Marko.
>-----Original Message-----
>You may want to look at the System.Security.Principal
namespace:
>
> WindowsIdentity wi = WindowsIdentity.GetCurrent();
> Console.WriteLine(wi.Name);
>
>that gave me the name of the user (DOMAIN\USERNAME). Is
this what you
>needed?
>
>marko
>
>"Wei" <yyuuxx@yahoo.com> wrote in message
>news:082201c36e4e$5c04f8c0$a001280a@phx.gbl...
>> Hi,
>>
>> Is there anyway(programatically) to find out under what
>> account the current application is running?
>>
>> Thanks,
>>
>> Yu
>
>
>.
>