Applications using enterpriselibraryProgramWhen used on some machines, An Exception error occurs. The prompt is as follows:
Security Exception
Note: An application attempts to perform operations that are not permitted by a security policy. To grant the required permissions to the application, contact the system administrator or change the trust level of the application in the configuration file.
Exception details: system. Security. securityexception: the requested registry access is not allowed.
You can find the answer in FAQs of Enterprise Library. There are three solutions:
1. Run the "installservices. Bat" batch file installed during Enterprise Library installation.
2. Run. Net's installutil program settings (the above script also uses the installutil command ).
3. Remove the usewmi, useeventlog, and useperformancecounter compilation parameters in the common project and re-compile entlib.