Accessing Web Service through a Proxy.
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.
|