Re: Accessing a .NET web service from an ATL un managed client through a Proxy.
- From: "Alexander Nickolov" <agnickolov@xxxxxxxx>
- Date: Mon, 27 Feb 2006 17:34:24 -0800
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.
.
- References:
- Prev by Date: Re: automatically generate a template class for a specified interface
- Next by Date: Re: taskschd.h
- Previous by thread: Accessing a .NET web service from an ATL un managed client through a Proxy.
- Next by thread: atlmincrt LNK2005 error
- Index(es):
Relevant Pages
|