1

Referencing this answer, I'm attempting to establish a proxy connection for a service reference, but am having trouble verifying that it's actually being used.

In my app.config, I have

<system.net>
  <defaultProxy useDefaultCredentials="true">
    <proxy
    usesystemdefault="False"
    proxyaddress="http://proxyaddresst.com:80"
    bypassonlocal="False"/>
  </defaultProxy>
</system.net>

but would like to be able to list the address of the proxy being used in the program itself, through

Console.WriteLine(DateTime.Now.ToString("hh:mm:ss.fff") + " Proxy: " + ???);

Is there a way to do this? It seems simple, but so did setting up the proxy in the first place, and the program isn't working as expected. I'd like to either verify the proxy is in use (and discount it as necessary) or verify that it isn't (and then look for another way to integrate it).

Community
  • 1
  • 1
Eiketsu
  • 203
  • 1
  • 2
  • 14
  • To prove the proxy is in use, change the proxy address to a bogus address and see if your program still works. – John Saunders Jan 13 '15 at 22:58
  • Sorry, since I had already added one comment, I forgot to add the following: Unlike forum sites, we don't use "Thanks", or "Any help appreciated", or signatures on [so]. See "[Should 'Hi', 'thanks,' taglines, and salutations be removed from posts?](http://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be-removed-from-posts). Bottom line is that courtesy is great for a conversation. We're not having a conversation here. It's a Q&A site. The lack of noise is one of the reasons why it's a _great_ Q&A site. – John Saunders Jan 14 '15 at 16:28
  • I suppose I'll try to do better about that in the future. But to stay on topic, yes, replacing the proxy with gibberish caused the called method to fail, and removing the proxy entirely gave a glut of varying errors, so it seems it's working as intended. Now if I could just find out why it's giving me [this trouble](http://stackoverflow.com/questions/27608832/remotely-called-process-failing-to-update-database). – Eiketsu Jan 14 '15 at 16:36

0 Answers0