I have a console application that consumes a dll, this dll needs some configuration data stored in the config file which obviously has to be at in the config file for the exe (console).
The dll is attempting to execute a ConfigurationManager.GetSection(string) command, it seems like the new security model is causing issues to my process. The console executable is been launched from the network which usually required the CAS policies to
be adjusted and they are for the 2.0, in 4.0 they have been removed and I should not be having this issue but apparently that is not the case. What I'm doing wrong?
The inner exception points to a SecurityException reading the config file or something along those lines. Below is the full exception. Same code built in 3.5 does not cause issues.
System.Configuration.ConfigurationErrorsException: An error occurred creating the configu
ration section handler for overrideConfigurations: Request failed. (R:\Development\Junk\n
ewConsole\TestConsoleApp.exe.Config line 5) ---> System.Security.SecurityException: Reque
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boole
an noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecuri
View Complete Post