I have some c# code (.Net 4) that makes calls to the Internet to get an XML file, however there is a long delay the first time the code block is hit! by adding the below to the app.conf the problem is resolved. However what I would like to do is check if there is a proxy uesd/set and if not then in code before each call turn off the proxy or the detection that is causing the 20 sec delay!
Can this be done? if so how would I do it?
<system.net>
<defaultProxy
enabled="false"
useDefaultCredentials="false" >
<proxy/>
<bypasslist/>
<module/>
</defaultProxy>
</system.net>