How to do HTTP post the framed MMS to MMSC

How to do HTTP post the framed MMS to MMSC SearchSearch
Author Message
Narasimha
New member
Username: Knarasi2

Post Number: 1
Registered: 11-2006
Posted on Friday, November 03, 2006 - 09:06 am:   

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
Posted on Thursday, April 05, 2007 - 10:33 am:   

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