【发布时间】:2010-11-12 10:12:39
【问题描述】:
是否可以检测/重用这些设置?
如何?
我得到的例外是 这是连接到http://www.google.com时的异常
System.Net.WebException: Unable to connect to the remote server --->
System.Net.Sockets.SocketException: A connection attempt failed because the
connected party did not properly respond after a period of time, or established
connection failed because connected host has failed to respond 66.102.1.99:80
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address,
ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout,
Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at mvcTest.MvcApplication.Application_Start() in
C:\\home\\test\\Application1\\Application1\\Program.cs:line 33"
【问题讨论】:
-
如果您遇到异常,请发布整个内容:ex.ToString()。
-
这很可能是防火墙问题。你只是没有连接。
-
好的,我将代码复制到一个新的控制台应用程序中,它可以立即运行它看起来像是在内置的网络服务器 vs2008 中获得了一些关于最终代码需要修复什么/在哪里的线索运行 recaptcha 所以它必须在 webhost 中执行
-
aaargh,我总是忘记 cmets 中的格式无法处理 CR !!! ...................无论如何,看起来 iis 沙箱中有一些许可/限制...... ......任何指针?
标签: c# proxy httpwebrequest detect