Hello,
I Build XMPP Server using OpenFire, And used in c# using Matrix XMPP sdk.
But i don't know How XML File Works on server.
Please, give me reference about this..
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
prince rajPosted Aug 30, 2014, 8:35 AM
--------------------------------------------------------
string xml = "
string url = "http://192.168.1.100:5222";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.ServicePoint.Expect100Continue = false;
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();
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
StreamReader sr = new StreamReader(res.GetResponseStream(), System.Text.Encoding.Default);
string backstr = sr.ReadToEnd();
sr.Close();
res.Close();
--------------------------------------------------------
But it Occur Error at res.
The server committed a protocol violation