How to fix WCF error: Request for the permission of type 'System.Security.Permissions.Environme


I am hosting a netTcpBinding WCF server in a Windows service. I am able to successfully connect to its remote calls via my own client without issue, so I know that it works well.

However, I generate the exception Request for the permission of type 'System.Security.Permissions.EnvironmentPermission when I attempt to connect to the same service via a .NET plugin fom a third party solution.

My client plugin loaded from the third party application is doing the following:

EndpointAddress endpointAdress = new EndpointAddress("net.tcp://localhost:2001/MyWCFServer/Server"); NetTcpBinding binding1 = new NetTcpBinding(); CTraderClient _client = new CTraderClient(new InstanceContext(this), binding1, endpointAdress); _client.RegisterBotInstance("GBPUSD", 30);

where RegisterBotInstance is a call to the remote method exposed by the WCF server.

When I call this remote method _client.RegisterBotInstance("GBPUSD", 30);the following exception is raised:

Additional information: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Action: System.Security.Permissions.SecurityAction.Demand

Can anyone think of a fix to this?

By the way, the third party application is cAlgo in case this is of any use.

It seems that this third party software has some trust issues.


The solution to this is to add this to the plugin header:

AccessRights = AccessRights.FullAccess


  • find the missing values from a set of values, using SQL
  • how to reset form on modal hidden or close? [closed]
  • What else can I do to troubleshoot a package not importing in python yet imports in ipython while in
  • How to reset Cassandra superuser, when Cassandra does not know 'cassandra' default user?
  • PHP Check If require_once() Content Is Empty
  • Detect which app has been launched in android
  • Applying SUPEE-6788, it removes static block on home page
  • How to check the permission whether a friend allow me to post on his wall or not using php sdk
  • How to do a pull request from my current state
  • Test-Path / System.IO.Directory::Exists not working as expected
  • Do stored procedures have the ability to delete a file from the OS?
  • What do getresuid() and setresuid() do?
  • Django RESTful API error “type object 'User' has no attribute '_meta'”
  • Gitlab - Google compute engine Continuous delivery
  • Can't access Facebook campaigns
  • How to upload files in php using html
  • Granting permissions to Azure Active Directory Web Application automatically
  • python: forcing relative imports to search from script file
  • Jenkins Grails plugin does not list lastest versions of Grails
  • Synchronize windows folders
  • Iron Router: How do I send data to the layout?
  • Does Apple allow the usage of sysctl.h within iOS applications?
  • Possible to “watch” both HAML and SASS at the same time?
  • Enabling DTD support in Sql Server
  • GAE: Way to get reference to an HttpSession from its ID?
  • How to generate and display a QR Code in ionic 2
  • Does Mobilefirst provide a provision to access web services directly?
  • chrome.tabs.executeScript only fires when the Developer Console is open
  • Typescript - Unable to get 'import' statement to function
  • Get object from AWS S3 as a stream
  • Cross-Platform Protobuf Serialization
  • Validaiting emails with Net.Mail MailAddress
  • Running a C# exe file
  • Do I've to free mysql result after storing it?
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • Proper folder structure for lots of source files
  • C# - Getting references of reference
  • How does Linux kernel interrupt the application?
  • Easiest way to encapsulate a HTML5 webpage into an android app?
  • Running Map reduces the dimensions of the matrices