Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Hi All, I am calling soap service using plugin in Dynamics 365. I am using below code for calling ---SOAP HTTPS---- service but i am getting "The provided URI scheme 'https' is invalid; expected 'http'.".

Posted on by 580

#region Calling WCF Service
var myBinding = new WSHttpBinding(SecurityMode.None);
myBinding.MaxReceivedMessageSize = 2147483647;
myBinding.MaxBufferPoolSize = 2147483647;
myBinding.SendTimeout = TimeSpan.FromMinutes(3);
myBinding.ReceiveTimeout = TimeSpan.FromMinutes(3);
myBinding.OpenTimeout = TimeSpan.FromMinutes(3);
myBinding.CloseTimeout = TimeSpan.FromMinutes(3);
myBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
myBinding.Security.Message.EstablishSecurityContext = false;
myBinding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
EndpointAddress endPointAddress = new EndpointAddress("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.svc");
ChannelFactory<ICustSupportService> factory = new ChannelFactory<ICustSupportService>(myBinding, endPointAddress);
ICustSupportService channel = factory.CreateChannel();

*This post is locked for comments

  • Verified answer
    MS CRM DYNAMICS Profile Picture
    MS CRM DYNAMICS 580 on at
    RE: Hi All, I am calling soap service using plugin in Dynamics 365. I am using below code for calling ---SOAP HTTPS---- service but i am getting "The provided URI scheme 'https' is invalid; expected 'http'.".

    I resolved the issue by adding below line of code

    --- myBinding.Security.Mode = SecurityMode.Transport;

  • Verified answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Hi All, I am calling soap service using plugin in Dynamics 365. I am using below code for calling ---SOAP HTTPS---- service but i am getting "The provided URI scheme 'https' is invalid; expected 'http'.".

    Hi Bhabani,

    Try changing the "var myBinding = new WSHttpBinding(SecurityMode.None);" to "var myBinding = new WSHttpBinding(SecurityMode.Transport);"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans