N
Nay
Hi
What is the best practice to find the identity(actually user name) of the
client that called the WS?
I use winform app that call WS. the WS run as anonymous on Win2003.
I guess that I should assign the credentials.
But which way:
s.Credentials = System.Net.CredentialCache.DefaultCredentials;
or
networkcredentialcache?
Furthermore, in the WS I saw many ways to get the user name.
I'm not sure about the difference, nad wheather this is the right way:
- System.Net.CredentialCache.DefaultCredentials.GetCredential
(HttpContext.Current.Request.Url,
HttpContext.Current.User.Identity.Name).UserName;
or
HttpContext.Current.User.Identity.Name;
Thanks
What is the best practice to find the identity(actually user name) of the
client that called the WS?
I use winform app that call WS. the WS run as anonymous on Win2003.
I guess that I should assign the credentials.
But which way:
s.Credentials = System.Net.CredentialCache.DefaultCredentials;
or
networkcredentialcache?
Furthermore, in the WS I saw many ways to get the user name.
I'm not sure about the difference, nad wheather this is the right way:
- System.Net.CredentialCache.DefaultCredentials.GetCredential
(HttpContext.Current.Request.Url,
HttpContext.Current.User.Identity.Name).UserName;
or
HttpContext.Current.User.Identity.Name;
Thanks