A
Atul Mittal
hi i am trying to use webclient methoid to transfer an XML string from
one server to other .... below is my coding paste
whenever i am doing an mywebclient.upload i get an error
internal server errror 500
any ideas what is the problem
both the servers are on same domain.
plzz help .... plzzzzz
Public Function xmlstrsend(ByVal redirectURL As String, ByVal xmlstr As
String) As String
Dim uriString As String
uriString = redirectURL
' Create a new WebClient instance.
Dim myWebClient As New WebClient
Dim postData As String = xmlstr
myWebClient.Headers.Add("Content-Type",
"application/x-www-form-urlencoded")
' Apply ASCII Encoding to obtain the string as a byte array.
Dim byteArray As Byte() = Encoding.ASCII.GetBytes(postData)
' Upload the input string using the HTTP 1.0 POST method.
Dim responseArray As Byte() = myWebClient.UploadData(uriString,
"POST", byteArray)
' Decode and display the response.
Dim returnxmlstr As String
returnxmlstr = Encoding.ASCII.GetString(responseArray)
Return returnxmlstr
End Function
one server to other .... below is my coding paste
whenever i am doing an mywebclient.upload i get an error
internal server errror 500
any ideas what is the problem
both the servers are on same domain.
plzz help .... plzzzzz
Public Function xmlstrsend(ByVal redirectURL As String, ByVal xmlstr As
String) As String
Dim uriString As String
uriString = redirectURL
' Create a new WebClient instance.
Dim myWebClient As New WebClient
Dim postData As String = xmlstr
myWebClient.Headers.Add("Content-Type",
"application/x-www-form-urlencoded")
' Apply ASCII Encoding to obtain the string as a byte array.
Dim byteArray As Byte() = Encoding.ASCII.GetBytes(postData)
' Upload the input string using the HTTP 1.0 POST method.
Dim responseArray As Byte() = myWebClient.UploadData(uriString,
"POST", byteArray)
' Decode and display the response.
Dim returnxmlstr As String
returnxmlstr = Encoding.ASCII.GetString(responseArray)
Return returnxmlstr
End Function