468,272 Members | 2,077 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,272 developers. It's quick & easy.

WebProxy and Web Service


I am not sure what is wrong, but here is what is going on: I have a
small Web Proxy server running to test real users using a proxy. It is
a basic one c#, seems to work. In my test application, I am trying to
connect to a Web Service going through the proxy. When I don't go
through it, obviously it works fine. Here is my code:

MyWebService service = new ProxyTest.MyWebService();

WebProxy proxyObject = new WebProxy("localhost:8889/",true);

if (requires auth)
NetworkCredential cred = new

CredentialCache credCache = new CredentialCache();
credCache.Add(new Uri("localhost:8889/"), "Negotiate", cred);
proxyObject.Credentials = credCache;

service.Proxy = proxyObject;

========== this works fine ============

When I try to than consume a Web Method, it times out and in the proxy
server application, I get the following error:

Connection from
System.Net.Sockets.SocketException: The requested name is valid and was
found in
the database, but it does not have the correct associated data being
resolved f
at System.Net.Dns.GetHostByName(String hostName)
at System.Net.Dns.Resolve(String hostName)
at ProxyHost.Class1.run() in c:\develop\proxyhost\class1.cs:line 53

Am I missing something?

Thanks in advance.

- Dan

Sep 13 '06 #1
0 1469

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by vooose | last post: by
2 posts views Thread by Sam Santiago | last post: by
reply views Thread by Michael S. Scherotter | last post: by
4 posts views Thread by Andrew | last post: by
3 posts views Thread by =?Utf-8?B?TXJOb2JvZHk=?= | last post: by
7 posts views Thread by Phil | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.