Error Serialization json by webServices

i`m using Datatables  when the Data comes more than 541 records , Databases stopped showing the rows , noticed  that the xml file size is 100KB when the records become 542 the file changes to 101Kb and data displayed , by google chrome debugging i got those Errors

1-

Failed to load resource: the server responded with a status of 500 (Internet Server Error)

and inner Error

Request format is unrecognized for URL unexpectedly ending ‘/Method_Name’.

then when i tried to add this code

<webServices>
<protocols>
<add name=”HttpGet”/>
<add name=”HttpPost”/>
</protocols>
</webServices>

to web.config file , the upper Error solved but the data did not displayed yet , then i tried to Maximize the Serialization json Size and Solved by this

<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength=”50000000″/>
</webServices>
</scripting>
</system.web.extensions>

the datatable displayed correctly and every thing is fine ..

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s