Reputation: 60556
I receive the error from a third party application exe. The Application is only a exe, no config file or others.
"error creating the web proxy specified in the 'system.net/defaultproxy' configuration section"
How can i handle that ?
Upvotes: 28
Views: 52166
Reputation: 826
I had the same problem with one of my apps. On TEST server everything was ok, on PROD server the app was failing with this error message.
Turns out that case is important! On my TEST server, the config file had <system.net><defaultproxy>
=> working.
On my PROD server, I had the same setting => not working. I changed that to <system.net><defaultProxy>
, with a capital 'P', and everything is fine now. I guess the framework version is not the same between my servers, and one forgives more spelling errors.
Edit: actually my PROD section was all lowercase. I probably messed up when editing the config file, and typed a keyboard shortcut to convert my file to lowercase...
Upvotes: 0
Reputation: 534
I ran "netsh winsock reset" (as administrator) and reset the PC to solve this problem. It was happening when trying to install a winforms application - which worked fine on all the other PCs in the office.
A clue was that Chrome wasn't able to access the internet on this PC - and the solution to that fixed both problems.
Upvotes: 1
Reputation: 140
For me when I received this error I managed to 'fix' it by including the 'type' attribute in my listener in the web.config:
<listeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics">
<filter type=""/>
</add>
</listeners>
However Visual Studio (2012) actually tells me that this attribute is not allowed... Still removing it leads to me getting the error, including it leads to it working correctly.
Upvotes: 0
Reputation: 31
In web.config file check if you have a sharedListeners tag. Inside each add tag you need to have the "type" attribute filled..... something like this:
<sharedListeners>
<add initializeData="c:\log\trace.svclog" name="logging" type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral,PublicKeyToken=c77a5c561934e999">
</add>
</sharedListeners>
Upvotes: 0
Reputation: 541
Try to add the below lines to your app.config or web.config and your application might work.
<system.net>
<defaultProxy enabled="false" useDefaultCredentials="false">
</defaultProxy>
</system.net>
Upvotes: 35
Reputation: 978
This error is somehow related to the .Net framework
you're building against.
I created a simple test app to perform a WebRequest
. If I set the target Framwework to 4.0, I get this error. If I then set it to 3.5, without changing the code, my request works fine.
It does not directly solve your issue, as you probably cannot change the external application you're using, but I hope this may be useful for people who look for the same error message.
Upvotes: 1
Reputation: 13106
I had this problem as well (putting this here for others). It turns out in my case I was calling a wcf service that was secured via ssl. The certificate was one issued internally for development purposes. The problem arises when your wcf service reference is configured for https://myserv/service.svc but the certificate has https://myserv.mydomain.com/service.svc.
Removing the fully qualified domin name (from the client element in app.config \ web.config (or if it in client.config) fixes the problem.
Upvotes: 0
Reputation: 61
In my case, I had a windows 2003 server and my .net 4.0 console application was placed on the "D" drive and I kept seeping this error when running it (it was trying to connect to a remote WCF service). As soon as I placed the application files on my "C" drive, everything worked. I have no idea why!
Upvotes: 0
Reputation: 4954
I had this same problem today and found a solution for it. In my case, the problem occurred because I was using a network disk for storing my project. When run from this network disk, this problem occurred. I moved the project to my local hard drive and it was gone. I am guessing this has something to do with security, as Windows considers the network drive less secure than my hard disk.
Upvotes: 61