[Cloud OCR SDK] (404) Not Found

  • 2K Views
  • Last Post 21 April 2014
question posted this 21 April 2014

hi

I am getting a response "The remote server returned an error: (404) Not Found." when trying to get

http://cloud.ocrsdk.com/processTextField?region=434,890,365,100&language=English,German&exportFormat=pdftextandimages

var url = string.Format("http://cloud.ocrsdk.com/processTextField?region={0}&language={1}&exportFormat={2}", region, language, exportFormat);

protected static XDocument GetResponse(string url)
       {

            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
            using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
            {
                using (Stream stream = response.GetResponseStream())
                {
                    return XDocument.Load(new XmlTextReader(stream));
                }
            }
       }

I am getting error at this line

using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())

plz suggest me what is wrong in this .

Close