Click to See Complete Forum and Search --> : Insufficient permissions for setting the configuration section 'defaultProxy'.
marjoh
September 26th, 2011, 05:43 AM
I get this error message when running a .NET console application I have developed. It's working fine when I run it on my local machine, but when I run the program from a network drive it crasches with the error message. I've googled around, but can't find a solution to my problem.
Any ideas?
Thanks!
JapyDooge
September 27th, 2011, 09:04 AM
Is the network drive readonly?
Are you requesting/setting proxy settings in the application, and, if so, can you paste the code here?
marjoh
September 28th, 2011, 06:28 AM
Thanks JapyDooge, for showing interest in this issue.
This is what I have in my app.config:
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy proxyaddress="http://address_to_firewall:8080" bypassonlocal="True" />
</defaultProxy>
</system.net>
The network drive is not readonly (and the application calls a web service outside the company network)
JapyDooge
September 28th, 2011, 06:44 AM
Ah,
It looks like the network drive is not trusted by the .NET Framework, this is pretty normal behavior, but can be really annoying.
Can you try running this?
CasPol -m -ag 1.2 -hash SHA1 -file \\Server\Path\To\Application.exe FullTrust
This should make the application (and all other items in it's path) fully trusted by .NET on your system.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.