Author: WalterAlex | Posted on: 10/28/2009 7:27:46 PM | Views : 1147

Hello.

This is the code I use to comunicate with a remote web server.

    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(urlPost); // a simple www address
         byte[] requestBytes = System.Text.Encoding.ASCII.GetBytes(xml);
         req.Method = "POST";
         req.ContentType = "text/xml;charset=utf-8";
         req.ContentLength = requestBytes.Length;         
         Stream requestStream = req.GetRequestStream();
         requestStream.Write(requestBytes, 0, requestBytes.Length);
         requestStream.Close();

      &nbs ...

Go to the complete details ...