Click here to Skip to main content
15,881,715 members
Articles / Web Development / ASP.NET
Tip/Trick

Overcoming Size Limits in WebService Data to Avoid Web Service Call Failed Error

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
3 Oct 2012CPOL 24.1K   2   4
How to solve web service call failed error

Introduction

This tip will help you to solve web service call failed error.

Background

Sometimes when we call web service from client side, we get an error web service call failed. This is caused by too much data return in the SQL Query behind the web service call, so the web service returns an error. A simple change to the web.config file can increase the size limit of data returned.

Using the Code

Just add the following code in your web.config:

XML
<system.web.extensions>
 <scripting>
   <webServices>
      <jsonSerialization maxJsonLength="5000000" />
   </webServices>
 </scripting> </system.web.extensions>

Points of Interest

This really helped me. Hope it helps you too.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Manorama Infosolutions, Kolhapur
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 5 Pin
nikol3x14-Jan-13 6:24
nikol3x14-Jan-13 6:24 
GeneralMy vote of 5 Pin
Nilesh Patil Kolhapur8-Nov-12 18:19
Nilesh Patil Kolhapur8-Nov-12 18:19 
GeneralMy vote of 5 Pin
anil730-Oct-12 5:40
anil730-Oct-12 5:40 
GeneralRe: My vote of 5 Pin
Nilesh Patil Kolhapur8-Nov-12 18:20
Nilesh Patil Kolhapur8-Nov-12 18:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.