Hmm weird that the assembly having this issue is System.Configuration! CLR version is 4.0. Caspol shouldn’t kick in if that’s the case. Eventually this turned out to be a bug.

This is fixed via a hotfix: http://support.microsoft.com/kb/2580188FIX: System.Security.SecurityException occurs when a .NET Framework 4-based application that calls a static method in the System.Configuration.ConfigurationManager class runs on a network share.

The KB article says the following…The application calls a static method in the System.Configuration.ConfigurationManager class. For example, the application calls the ConfigurationManager.GetSection method.

For this case this was true and the application was indeed calling ConfigurationManager.GetSection.

Disclaimer:————–Please read through the hotfix to be very sure that this hotfix applies to you. A classic symptom would be .net 4.0 + ConfigurationManager.GetSection call.