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

Web.Permissions Error - Plugin

$
0
0

Hello everyone,

i have a plugin out registered of the sandbox. It should be able to send some data to an external system. I set the endpoint as a static IP.

Error:

Request for the permission of type ‘System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed

My code:

BasicHttpBinding myBinding = new BasicHttpBinding();
myBinding.Name = "BasicHttpBinding_IPOCService";
myBinding.Security.Mode = BasicHttpSecurityMode.None;
myBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
myBinding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
myBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;

ChannelFactory<Interface> factory = new ChannelFactory<Interface>(myBinding, endPointAddress);
var client = factory.CreateChannel();

Thank you in advance for any advice :)


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images