Find the identity of client call WS

Discussion in 'ASP .Net Web Services' started by Nay, Feb 18, 2006.

  1. Nay

    Nay Guest

    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
     
    Nay, Feb 18, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Giovanni Bassi
    Replies:
    0
    Views:
    651
    Giovanni Bassi
    Oct 20, 2003
  2. nalbayo
    Replies:
    2
    Views:
    5,509
    Bruce Barker
    Nov 11, 2005
  3. JimLad
    Replies:
    0
    Views:
    452
    JimLad
    Jan 16, 2009
  4. Frederick D'hont
    Replies:
    0
    Views:
    314
    Frederick D'hont
    Jul 25, 2005
  5. Replies:
    6
    Views:
    456
Loading...

Share This Page