View Single Post
  #22 (permalink)  
Old January 4th, 2007, 05:08 AM
s8sopr4 s8sopr4 is offline
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, I have the exception:System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server.

The code is:
Dim URL As String = sRemoteServer
Dim request As HttpWebRequest = WebRequest.Create(URL)
request.Method = "POST"
Dim writer As New System.IO.StreamWriter(request.GetRequestStream())
writer.Write(sParameters)
writer.Close()

Dim response As HttpWebResponse = request.GetResponse()
Dim reader As New System.IO.StreamReader(response.GetResponseStream( ))
Dim str As String = reader.ReadLine()


Could anyone help me, please?
Thanks in advance.

Reply With Quote