Re: Accessing a .NET web service from an ATL un managed client through a Proxy.



Purportedly CredRead should do the job. I haven't used it
myself so I can't vouch, but Eugene Gershnik (another MVP)
has recommended it in the past on the networking group:

http://groups.google.com/group/microsoft.public.win32.programmer.networks/browse_frm/thread/e7fafc1993b421c/

Note: in your case you want to pass the target server, not
the proxy, since you want credentials for the server.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

<punitparikh@xxxxxxxxx> wrote in message
news:1140768120.867490.107730@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,

I have an unmanaged VC7 app (ActiveX control implemented using MFC)
calling a C# dotnet service. I'm using the
VS2003 generated proxy class derived from
CSoapSocketClientT. The activeX control works fine but when used
through a proxy that requires authentication I end up getting 407
error. I tried using authentication schemes as suggested in most of the
threads.

CAtlHttpClient& httpClient = webserviceInst.m_socket;
CSampleBasicAuth basicAuth;
httpClient.AddAuthObj(_T("BASIC"), &basicAuth, &basicAuth);
CNTLMAuthObject ntlmAuth;
httpClient.AddAuthObj(_T("NTLM"),&ntlmAuth);
httpClient.NegotiateAuth(true);

webserviceInst is the CSoapSocketClientT derived proxy class. Am I on
the right track with this?

Also if I use only basic authentication and have the user enter his
credentials it works fine. But with this combination of authentication
schemes NTLM and BASIC the NTLM authentication fails and somehow basic
authentication is not carried out after that..

Is there any way in which I could read the Internet Explorer
credentials and use them while accessing the webservice maybe using (
CSoapWininetClient ) . As the the idea of basic authentication and the
activex plug-in asking users for credentials would not be correct?

Please suggest me an appropriate way in which this isue can be
resolved.

Thanks in Advance,
Punit.



.



Relevant Pages

  • Re: BASIC authentication Issues with IE - Part II - Solved but WHY?
    ... Page2.asp also requires Basic Authentication ... > automatically sends credentials, and I'm giving access. ... Microsoft is ...
    (microsoft.public.inetserver.iis.security)
  • Re: Impersonate user from ASP.NET - access to network file share
    ... passed in response to authentication challenges from remote resources. ... If your credentials are clear text at the web server such as in Basic authentication with no SSL ...
    (microsoft.public.dotnet.general)
  • OutlookAnyWhere, NTLM and Basic authentication does not work combi
    ... At the moment everywhere Basic authentication is enabled, ... their credentials, because Windows Authentication is not switched on. ... You would think that this is a matter of enabling Windows Authentication, ... EWS,Public,Autodiscover) my clients outside (using basic authentication) are ...
    (microsoft.public.exchange.setup)
  • Re: Domain Authentication Help
    ... Intregrated authentication should not ask for any credentials if the user is ... logged into the system but I am not sure what Digest Authentication does. ... to use basic authentication in which case I strongly recommend SSL. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Default credentials
    ... > comes up on my client site requires NTLM or Basic authentication? ... > a web browser - I assume it must be something they have set up ... If your receive a Dialog asking for your creds with NTLM auth ... credentials of the current security context. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)

Quantcast