Last post Feb 03, 2017 02:50 AM by Cathy Zou
Feb 02, 2017 07:01 AM|ssjGanesh|LINK
I got this exception if I have added <defaultproxy> in my web.config file. This is my sample code in web config
<defaultProxy enabled="true" useDefaultCredentials="false">
If I remove this section its working fine. How to resolve this issue?
Feb 02, 2017 07:18 AM|ignatandrei|LINK
maybe you want to useDefaultCredentials="true"instead of
And verify if this
Feb 02, 2017 12:55 PM|ssjGanesh|LINK
I also tested with useDefaultCredentials="true"
and then this is just given for example. I have proper proxy address<proxy proxyaddress="http://myproxyserveraddress"/>
Feb 02, 2017 01:03 PM|PatriceSc|LINK
Or try first to better understand the exception. According to https://msdn.microsoft.com/en-us/library/system.aggregateexception(v=vs.110).aspx it doesn't seems
directly related to the proxy but perhaps to any failure that could happen during an async request. Have you triedt to look at the call stack or to the innerexception(s) properties to see if you can't get some more detail about the problem?
In my experience it's often quicker to spend a bit more time in understanding the exact problem and fix the problem you found rather than assuming too early what the problem is and trying various fixes until it works...
BTW what happens when you don't have a proxy section? (ie are you 100% sure the possible error you had previously is caused by a missing proxy).
Feb 03, 2017 02:50 AM|Cathy Zou|LINK
An exception is thrown if the module element specifies a non-public type, the type is not deriving from the IWebProxy class, an exception from the default constructor of this object occurred, or an exception occurred while retrieving the system-specified
default proxy. The InnerException property on the exception should have more information about the root cause of the error.
Following article is about how to Configure an XML Web Service Client by Using the .NET Framework to Work with a Proxy Server.