Unmanaged C++ Credentials
Hi,
I'm trying to access a Web Service in Unmanaged C++. Everything is okay except that I can't assign the credentials for the web service. (It doesn't appear as a menu option after I type "."). In VB.Net, here is how the code looks:
Code:
ws.Credentials = System.Net.CredentialCache.DefaultCredentials
How can I duplicate this in Unmanaged C++? :confused:
Thanks,
OneSource
Re: Unmanaged C++ Credentials
Did you ever find a solution to this?
I have tried.
aoNTLM CNTLMAuthObject;
Proxy.m_socket.AddAuthObject(&aoNTLM); //there is also Basic
But this only supports directory auth. not "Windows Authenication"
Seams as if there is a short fall here.
Re: Unmanaged C++ Credentials
I am in conversation with microsoft at the moment - i will let you (and the rest of the world) know what the outcome is.
I have only seen posts of people with this problem but no answer.
I find it odd that this would not be possble given the release of 2005 where the issue still remains.
Re: Unmanaged C++ Credentials
Resolved!
I am posting this reply as i have had no help from groups, all similar questions i found had no satisfactury answers.
I found it by accident.
The C++ wrapper generator created by SPROXY take a tamplate parameter for the client connector. The default is CSoapSocketClient. This client only support NTLM via the AddAuthObject The DefaultCredential can use other tecnologies suck as Windows Inegrated (via Kerberos) Secutiy.
All you need to do is Override the defaul template param when declaring your proxy.
Like this.
Instead of:
CWebService<> Proxy;
do this
CWebService<CSoapWininetClient> Proxy;
and that behaves the same.
I hope that somone fiinds this posting before having to spend 3 days before stumbling accross this.
EXTRA KEY WORDS : Kerberos, atlsoap
Re: Unmanaged C++ Credentials
Juxta,
After you declare your proxy like you suggested...
CWebService<CSoapWininetClient> Proxy;
...how do you specify a username and password to use for authenticating?
Thanks.