public static void Main()
Console.WriteLine("Hello World");
public static string XmlHttpRequest(string urlString, string xmlContent)
HttpWebRequest httpWebRequest = null;
HttpWebResponse httpWebResponse = null;
httpWebRequest = (HttpWebRequest)WebRequest.Create(urlString);
bytes = System.Text.Encoding.ASCII.GetBytes(xmlContent);
httpWebRequest.Method = "POST";
httpWebRequest.ContentLength = bytes.Length;
httpWebRequest.ContentType = "text/xml; encoding='utf-8'";
using (Stream requestStream = httpWebRequest.GetRequestStream())
requestStream.Write(bytes, 0, bytes.Length);
httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
if (httpWebResponse.StatusCode == HttpStatusCode.OK)
using (Stream responseStream = httpWebResponse.GetResponseStream())
using (StreamReader reader = new StreamReader(responseStream))
response = reader.ReadToEnd();
throw new Exception(we.Message);
catch (Exception ex) { throw new Exception(ex.Message); }