HI guys ,
"http://www.google.com/transliterate/indic?tlqt=1&langpair=en|hi&text=" + HttpUtility.UrlEncode("India") + "&from=en&to=hi;
I have some issue when i am calling this url from code behind .
The remote server returned an error: (404) Not Found this error i'm getting.
but if i directly put this URL then it is working file is also downloading.
Here is my code
uri = "http://www.google.com/transliterate/indic?tlqt=1&langpair=en|hi&text=" + HttpUtility.UrlEncode("India") + "&from=en&to=hi;
HttpWebRequest translationWebRequest = (HttpWebRequest)WebRequest.Create(uri);
WebResponse response = null;
response = translationWebRequest.GetResponse();// in this line error is coming
Stream stream = response.GetResponseStream();
Encoding encode = Encoding.GetEncoding("utf-8");
StreamReader translatedStream = new StreamReader(stream, encode);
Can any one help me ... how to solve this error!


Salman BegRank #284 · 8.8K reputationPosted Feb 19, 2019, 4:24 AM EST
Madan ShekarRank #428 · 5.9K reputationPosted Feb 19, 2019, 12:13 AM EST
ram kumarRank #5,536 · 296 reputationPosted Feb 19, 2019, 1:02 AM EST