webservice is not calling

webservice is not calling

nomi60nomi60 Posts: 3Questions: 1Answers: 0

I created this code in Asp.net and it runs properly on my local host project, however when I deploy the same code to my live server, it generates an error since I want to get 50,000+ entries from the database.!
error snap.

snap attached in link.

I've tried renaming the URL to test.abc.com/WebServiceDataTable.asmx/GetDataForDataTable, but that still doesn't work for me. Can someone help?

$('#tblDataTable').DataTable({
"processing": true,
"serverSide": true,
"ajax": {
url: "/WebServiceDataTable.asmx/GetDataForDataTable", type: "post" },
"columns": [
{ "data": "name" },
{ "data": "father_Name" }
]
});

Answers

  • kthorngrenkthorngren Posts: 21,205Questions: 26Answers: 4,927

    error snap.

    Guessing this is a Chrome error. Sounds like the browser is running out of memory with 50,000+ rows of data.

    it generates an error since I want to get 50,000+ entries from the database

    You have "serverSide": true, which Datatables expects the server script to page the data returned to the client. So the server script should only return the data for the page being displayed. But it sounds like the server script is return 50,000+ rows of data. For server side processing to work your server script is expected to follow the server side processing protocol. Also see the server side processing docs.

    If your server script doesn't support the server side processing protocol you could try deferRender to see if it helps. But likely you will want to move towards server side paging.

    Kevin

  • nomi60nomi60 Posts: 3Questions: 1Answers: 0

    when i am trying to get only 100 records from database it also does not work for me.

  • kthorngrenkthorngren Posts: 21,205Questions: 26Answers: 4,927

    What debugging steps have you taken?

    What do you see in the browser's network inspector for the XHR response?

    What errors do you get in the browser's console?

    Can you post a link to your page or a test case showing the issue so we can take a look?

    Kevin

  • nomi60nomi60 Posts: 3Questions: 1Answers: 0

    test.roshnilpg.com/DataTableExample.aspx
    this is my URL, please run it in browser it give u an error snap is attached in URL for network XHR.

    in Network it gives a 500 Interval Server Error.
    in Console same error "
    POST http://test.roshnilpg.com/WebServiceDataTable.asmx/GetDataForDataTable 500 (Internal Server Error)".

  • allanallan Posts: 63,281Questions: 1Answers: 10,425 Site admin

    For a 500 error you'd need to refer to your server's logs. It could be virtual anything from a permissions issue to a db connect error.

    Allan

Sign In or Register to comment.