REST web service and BAD URL

Posted by Shivathebravo under Regular Expressions on 5/21/2011 | Points: 10 | Views : 2176 | Status : [Member] | Replies : 1
I am working on a project where we are building REST services using (ASP.NET, C# )based on users SQL query.
Some of the query brings large amount of data so when I try to display result into XML format using REST get method it say connection was reset.
Is there a limitation on browser to show millions of records in xml format?
sometime when users create their query and build the REST Uri it say BAD ULR some of the URI length could be larger than 500 characters.
Is there a way to solve these problems.




Responses

Posted by: SheoNarayan on: 5/21/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
For the 1st problem, you can increase the execution time out, look at this post response http://www.dotnetfunda.com/forums/thread154-systemwebhttpexception-request-timed-out-error-while-accessing-m y.aspx[/LINK]. You are getting this error because of the large amount of data taking time to be processed. Ideally you should create multiple xml files (like file1.xml, file2.xml etc.)

For the 2nd problem, you should url encode your string before sending them as RESTful request. Visit this http://www.dotnetfunda.com/interview/exam1335-explain-serverurlencode-method-.aspx.

Hope this will be useful.

Thanks



Regards,
Sheo Narayan
http://www.dotnetfunda.com

Shivathebravo, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response