NOK$ERROR$The remote server returned an error: (414) Request-URI Too Large.
try { WriteErrorLogs("Request", DateTime.Now.ToString(), sData); WebRequest req = null; WebResponse rsp = null; req = WebRequest.Create(uri); req.Method = "POST"; // Post method req.ContentType = "soap/xml"; // content type ASCIIEncoding encoding = new ASCIIEncoding(); //byte[] data = encoding.GetBytes(sData); StreamWriter writer = new StreamWriter(req.GetRequestStream()); writer.Write(sData); writer.Close(); rsp = req.GetResponse(); StreamReader reader = new StreamReader(rsp.GetResponseStream()); String xmlData1 = reader.ReadToEnd(); reader.Close(); WriteErrorLogs("Response", DateTime.Now.ToString(), xmlData1); return xmlData1; }
public string sendsms(string username, string pass, string senderid, string dest_mobileno, string message, string response) { response = string.Concat(sendsmsurl, "?username=", username, "&pass=", pass, "&senderid=", senderid, "&dest_mobileno=", dest_mobileno, "&message=", message, "&response=", response); return DoHttpsPost(response, response, null); }
req = WebRequest.Create(uri); getting too large value
if i try to add only smsurl , username,pass and sender id then it gives error like
below
"NOK$ERROR$The remote server returned an error: (414) Request-URI Too Large.""pass not found..!(check for space if you have included the parameter)""message not found..!(check for space if you have included the parameter)""dest_mobileno not found..!(check for space if you have included the parameter)")