G
Greg
I do see other postings here about getting the current Windows User Name.
But, they don't seem to apply to me. At least I don't think they do.
I want to be able to get the Current Windows User Name from what ever
computer is loading my web page. For example. On my development computer when
I used the following code:
string strUserName = WindowsIdentity.GetCurrent().Name.Substring(
WindowsIdentity.GetCurrent().Name.LastIndexOf(@"\") + 1);
it returns my current Windows Login Name.
But, once I move my web-site aspx files to the web server it returns
"NETWORK SERVICE" all the time.
I don't this for Security purposes. I'm only using this information to know
what Windows User Accounts are accessing web pages. What am I doing wrong?
And, how can I get the current Windows User Name for the computer requesting
the web page?
Thanks.
But, they don't seem to apply to me. At least I don't think they do.
I want to be able to get the Current Windows User Name from what ever
computer is loading my web page. For example. On my development computer when
I used the following code:
string strUserName = WindowsIdentity.GetCurrent().Name.Substring(
WindowsIdentity.GetCurrent().Name.LastIndexOf(@"\") + 1);
it returns my current Windows Login Name.
But, once I move my web-site aspx files to the web server it returns
"NETWORK SERVICE" all the time.
I don't this for Security purposes. I'm only using this information to know
what Windows User Accounts are accessing web pages. What am I doing wrong?
And, how can I get the current Windows User Name for the computer requesting
the web page?
Thanks.