Author: samuel_cyk | Posted on: 2/7/2010 8:33:35 PM | Views : 322

I wrote a code to send file as below:



Dim objXMLDoc As New XmlDocument objXMLDoc.Load("C:\Inetpub\wwwroot\XMLSchema_Test\XML\1773777.xml") Dim blnResponse As Boolean Dim objURI As Uri = New Uri("https://172.16.17.2/XMLSchema_Tests1/Web%20Forms/frmXML_Receive.aspx") Dim objWR As HttpWebRequest = HttpWebRequest.Create(objURI) blnResponse = objWR.HaveResponse Dim strXML As String = objXMLDoc.OuterXml objWR.Method = "POST" Dim encoding As New System.Text.ASCIIEncoding Dim btXMLLen() As Byte = encoding.UTF8.GetBytes(strXML) objWR.ContentLength = btXMLLen.Length objWR.KeepAlive = False Dim streamToSend As IO.Stream = objWR.GetRequestStream Dim strMessage As String Dim strStatus As String Dim blnConnect As Boolean Try ...

Go to the complete details ...