Click here to Skip to main content
15,907,183 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
data table when filled with json, jquery and webserice run fine on local machine but when publish on server it is giving Failed to load resource: the server responded with a status of 500 (Internal Server Error)


What I have tried:

$.ajax({
            url: "testing.asmx/Get_DashBoardData",
            type: "post",
            dataType: "json",
            success: function (data) {
                $('#MO').dataTable({
                    data: data,
                    "bInfo": false, //Dont display info e.g. "Showing 1 to 4 of 4 entries"
                    "paging": false,//Dont want paging                
                    "bPaginate": false,//Dont want paging   
                    "bFilter": false, //hide Search bar
                    columns: [
                        { 'data': 'abc' },
                        { 'data': 'cde' },
                    ]
                });
            },
            error: function (request, status, error) {
                alert(request.responseText);
            }
        });
Posted
Comments
MadMyche 1-Jun-20 14:07pm    
The actual exception would be very helpful
Khan Sameer 1-Jun-20 14:22pm    
When i check inspecting the page in the Network tab the function Get_DashBoardData is shown in red color with
Name : Get_DashBoardData
Status : 500
Type : xhr
Initiator : jquery.min.js
MadMyche 1-Jun-20 17:40pm    
The actual exception on the server is what I was looking for
Khan Sameer 2-Jun-20 1:10am    
Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the
arguments objects for calls to them at Function.invokeGetter (<anonymous>:1:142)]

Internal Server Error
jquery.min.js:2 [Violation] 'load' handler took 21304ms
jquery.min.js:2 [Violation] 'setTimeout' handler took 5863ms
Richard Deeming 2-Jun-20 6:11am    
You're still looking at the Javascript error. You need to inspect the network request and look at the response to see if the server-side error details are returned. If they're not, then you'll have to check the application event log on the server to find out what the problem is.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900