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

WebRequest.Create(Uri) method is failing to create instance of HttpWebRequest

$
0
0

I am using the below code to integrate SharePoint online & Dynamics 365 Online for creating folder in SharePoint. When i tried this code on console application it's working fine. But same code is not working if i registered as a plugin in CRM. While debugging the code i am getting the error in the highlighted line.

Uri MsoSTSUri = new Uri(msoStsUrl);

HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(MsoSTSUri);

byte[] responseData = HttpHelper.SendHttpRequest(
MsoSTSUri,
"POST",
saml11RTBytes,
"application/soap+xml; charset=utf-8",
request,
null);

I Would appreciate any help fix this issue.

Thanks,

Kanagaraj Pandian.


Viewing all articles
Browse latest Browse all 79901

Trending Articles



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