0

I have a Web app calling a Web Service by IP with the following code:

ws.Proxy = System.Net.HttpWebRequest.DefaultWebProxy;
ws.Credentials = System.Net.CredentialCache.DefaultCredentials;
ws.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;

I believe this uses the IE proxy settings. I'm trying to troubleshoot a separate issue and want to confirm the default proxy details being used.

How do I do that?

I tried making sense of this: How to AutoDetect/Use IE proxy settings in .net HttpWebRequest

Community
  • 1
  • 1
IrishChieftain
  • 15,108
  • 7
  • 50
  • 91
  • What "proxy details" do you need exactly? Do you just need the proxy url? If so, this is discussed here: http://stackoverflow.com/questions/17078894/get-ies-default-proxy-with-defaultwebproxy – Scotty May 11 '16 at 04:14
  • Correct I just need the proxy URL but it's giving back whatever I pass as a parameter. When I used the GetProxy method it keeps returning the uri passed as a parameter, not the uri of the proxy... – IrishChieftain May 11 '16 at 16:01

1 Answers1

0

I failed to get the proxy uri back using Scotty's link in the comments or this one:

https://msdn.microsoft.com/en-us/library/vs/alm/system.net.iwebproxy.getproxy(v=vs.110)

So had to use another approach to troubleshoot my app. Not an answer, just closing this out.

IrishChieftain
  • 15,108
  • 7
  • 50
  • 91