I have a .NET 4.exe (Winform Desktop application) to which I have added an extension for WCF. The application loads normally on the local computer, but when loading over the network throws a SecurityException. If I omit setMaxFaultSizeBehavior behaviorExtension, then I can download the application over the network. I would appreciate any information that could help with this. I confirmed that the files are not locked, and the assembly name is an exact match, including spaces.
The corresponding part of app.config looks like this (I shortened the type name and assembly name, in the actual configuration file, I use the full namespace and assembly name):
<system.serviceModel> <bindings configSource="bindings.config" /> <client configSource="clients.config" /> <extensions> <behaviorExtensions> <add name="setMaxFaultSizeBehavior" type="SetMaxFaultSizeBehavior, BehaviorAssembly, Version=1.8.0.0, Culture=neutral, PublicKeyToken=41b332442f1101cc" /> </behaviorExtensions> </extensions> <behaviors> <endpointBehaviors> <behavior name="LargeQuotaBehavior"> <dataContractSerializer maxItemsInObjectGraph="2147483600" /> <setMaxFaultSizeBehavior /> </behavior> </endpointBehaviors> </behaviors>
The exception that I get when working on the network is:
An error occurred creating the configuration section handler for system.serviceModel/behaviors: Request failed. (\\server\Share\app.exe.Config line 22) Exception Type: System.Configuration.ConfigurationErrorsException Source: System.Configuration
With an internal exception System.Security.SecurityException
source share