Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

NOK$ERROR$The remote server returned an error: (414) Request-URI Too Large.

$
0
0

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)")



Viewing all articles
Browse latest Browse all 4850

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>