User-1210839387 posted
I have a VB.Net application where I am posting to an HTTP server that has a classic asp page and I am getting the following exception
(it's throwing the exception on line 13). Does anyone know how to troubleshoot this? thanks
:
<EXCEPTION>
The remote server returned an error: (500) Internal Server Error
</EXCEPTION>
1 PostData =
"externalID=" ID
2 Dim strPath As String = "http://200.000.00.00/userfiles/someclassicasppage.asp"
3 request = CType(WebRequest.Create(strPath), HttpWebRequest)
4 request.ContentType = "application/x-www-form-urlencoded"
5 request.ContentLength = PostData.Length
6 request.Method = "POST"
7 request.AllowAutoRedirect = False
8
9 Dim requestStream As Stream = request.GetRequestStream()
10 Dim postBytes As Byte() = Encoding.ASCII.GetBytes(PostData)
11 requestStream.Write(postBytes, 0, postBytes.Length)
12 requestStream.Close()
13 response = CType(request.GetResponse(), System.Net.HttpWebResponse)