How to do HTTP post the framed MMS to MMSC | Search |
NowSMS Support Forums ⬆ MMS & SMS Technical Discussions (unsupported) ⬆ Archive through April 05, 2007 ⬆ |
◄ ► |
Author | Message | |||
Narasimha New member Username: Knarasi2 Post Number: 1 Registered: 11-2006 |
I am using c# and trying to post mms to the MMSC by HTTP POST. but that is returning me '500. Internal server". try { string header = "X-MMSC-Billingdata:" + BillingCategory + ";" + BillingPrice; // Assigning the final string data = strFinal; wreq = (HttpWebRequest)WebRequest.Create(MmsUrl); wreq.Method = "POST"; wreq.ContentType = "multipart/related; boundary=" + MmsPushBoundary + ";" + "type=" +Convert.ToChar(34)+ "application/xml" +Convert.ToChar(34) ; wreq.Headers.Add(header); wreq.ContentLength = data.Length; // User credentials CredentialCache wrCache = new CredentialCache(); wrCache.Add(new Uri(MmsUrl), "Basic", new NetworkCredential(UserName, UserPassword)); wreq.Credentials = wrCache; // keep alive property wreq.KeepAlive = false; // check the connection with proxy or not if (useProxy == true) { wreq.Proxy = new WebProxy(ProxyServer, ProxyPort); } wreq.Timeout = TimeOut; } catch (Exception Excep) { ErrorMessage = Excep.Message; return false; } try { // Get the web Request Stream myStream =(Stream)wreq.GetRequestStream(); myStream.Write(data, 0, data.Length); myStream.Close(); wres = (HttpWebResponse) wreq.GetResponse(); // Get the web Response myStream = wres.GetResponseStream(); StreamReader mystreamreader = new StreamReader(myStream); strResp = mystreamreader.ReadToEnd() ; mystreamreader.Close(); myStream.Close(); wres.Close(); does anybody help me ? | |||
Ramjendra Dixit New member Username: Ramjendra Post Number: 6 Registered: 04-2007 |
Please check the posting url which you configure on handset or on application which are you connecting if it is ok then you wont get this problem |