Exception when specifying defaultProxy in app.config when running NET4.0 application from network share

妖精的绣舞 提交于 2019-12-04 02:19:59
Joe

See this Microsoft Knowledge Base article:

Symptoms:

  • You run a Microsoft .NET Framework 4-based application that is stored on a network share.
  • The application calls a static method in the System.Configuration.ConfigurationManager class. For example, the application calls the ConfigurationManager.GetSection method.

In this scenario, a System.Security.SecurityException exception is thrown and then the application crashes.

Cause:

The issue occurs because the method fails to access configuration section from the application on network share.

You can request the hotfix from that site.

We've seen similar symptoms - same error message

Insufficient permissions for setting the configuration section 'defaultProxy'

when running a Console application where the files were 'blocked'.

The files had been installed by downloading a zip file from a hyperlink and the zip file wasn't 'unblocked' before unzipping.

Unblocking all the files (you have to do them individually in Windows) from Explorer > right-click > Properties > Unblock resolved the problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!