Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

SOAP request with windows authentication issue

$
0
0

Hi, 

I am facing an issue to execute SOAP request from MS CRM plugin. Its a integration with Biz Talk. Earlier i was able to execute same with Anonymous auth but now they turned it to windows auth, and I am not able to consume it, it gave me error ‘The remote server returned an error: (401) Unauthorized.’ 

Here is my code

//System.Net.WebRequest.DefaultWebProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;

HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
webRequest.Proxy.Credentials = CredentialCache.DefaultCredentials;

this above part works fine for anonymous setting. 

For Windows auth i tried following code 

1. HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
webRequest.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials;

2. HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
webRequest.Proxy.Credentials = new NetworkCredential("Ser-BDL-CRM_Dev", "uT5fzuYg", "AMERICA");

3. HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
CredentialCache cc = new CredentialCache();
cc.Add(
new Uri(url),
"NTLM",
new NetworkCredential("Ser-BDL-CRM_Dev", "uT5fzuYg", "AMERICA"));
webRequest.Proxy.Credentials = cc;

 Any help will appreciated.

Thanks.  


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>