Getting user ID from Web Service credentials

From: Jeff Connelly (nomail_at_thank.you)
Date: 04/12/05

  • Next message: Celio: "Object Security"
    Date: Tue, 12 Apr 2005 16:09:29 -0400
    
    

    Fairly new to Windows security issues.... We have login to our application,
    and I'm trying to implement Windows authentication. It works OK in the
    standalone client app (I use their Windows current user name to log them
    in.) When I use a Web Service, I don't think it's working. I'll use this
    example provided by Microsoft.

    There's a Web Service called Service1. In the client app:

    localhost.Service1 myProxy = new localhost.Service1();
    myProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;

    myProxy is of type System.Web.Services.Protocols.SoapHttpClientProtocol, I
    believe. This is supposed to add the user name and password to the HTTP
    headers. The code runs, however I can't verify this. I can't see any way
    to get the user name from the Web Services code. When I look at the user
    name in the credentials object above from the client side, it's always
    blank, and I don't know how to see it in the headers from the Web Services
    side.

    For both the client side caller and the Web Service, I have set in IIS
    Integrated Windows Authentication on, and anonymous access off. Thanks for
    any pointers.


  • Next message: Celio: "Object Security"

    Relevant Pages

    • Re: Getting user ID from Web Service credentials
      ... Windows Authentication in IIS, when Anonymous access is turned off. ... System.Net.CredentialCache.DefaultCredentials on the client side. ... >> any way to get the user name from the Web Services code. ... >> For both the client side caller and the Web Service, ...
      (microsoft.public.dotnet.security)
    • Re: Dynamically Change URL of web service
      ... Microsoft MVP - Windows Client ... > client apps will use the exact same web service, ... What this does is put an entry in the config file, ... >>> How can I dynamically change this when the client app loads. ...
      (microsoft.public.dotnet.framework.windowsforms)
    • Re: Dynamically Change URL of web service
      ... client apps will use the exact same web service, ... What this does is put an entry in the config file, ... > Microsoft MVP - Windows Client ... >> How can I dynamically change this when the client app loads. ...
      (microsoft.public.dotnet.framework.windowsforms)
    • VC8 CAtlHttpClientT::NegotiateAuth has a problem
      ... This C++ client app kept failing to access that web service with HttpStatus ... 401 allthough I've been using CNTLMAuthObject to provide the ... BSTR resultStr; ...
      (microsoft.public.vc.atl)
    • Re: integrated security over vpn
      ... > SQL 2000 is using Windows Authentication, and I can access tables, Stored ... >> Are you using Windows authentication with SQL Server or SQL Server ... >> easy to do on a home machine scenario as I would expect the home machine ... You could create a web service that returns and accepts the ...
      (microsoft.public.dotnet.security)