1

VS IDE を使用して以下のコードを実行すると、正常に動作しますが、IIS からの実行中に例外が発生します

 Dim strurl As String = "abc"
 Dim myHttpWebRequest As HttpWebRequest = CType(WebRequest.Create("http://www.google.com/search?sourceid=navclient&gfns=1&q=" + strurl), HttpWebRequest)

私が得ている例外は

例外

    System.Net.WebException: Unable to connect to the remote server ---> 
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 173.194.67.147:80 at
 System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) 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()
4

0 に答える 0