Datatables work on Local machine but not working while publishing on IIS (Ajax Error)
Datatables work on Local machine but not working while publishing on IIS (Ajax Error)
peterjones30
Posts: 5Questions: 1Answers: 0
Database could not be loaded after I published my application, though it works perfectly fine on Visual Studio IIS. It throws DataTables warning: table id=xyz - Ajax error.
Do I have to change something in web.config before publishing?
This discussion has been closed.
Answers
Did you follow the troubleshooting steps at the link provided in the error?
https://datatables.net/manual/tech-notes/7
The server is likely responding with an error which will require looking at the server logs to start troubleshooting.
Kevin
Hi Kevin, Thanks for responding. I tried troubleshooting steps. Its an Internal server error 500.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'EditorGenerator.WebApiApplication'
That is an error generated by your server and is not a Datatables error. The server config probably needs to be reviewed. I'm not familiar with the server you are using. A google search of that error has some hits on Stackoverflow. Maybe some of those will help you configure the server.
Kevin
Just to check, it works when you run it locally, but if you publish it to a server and then run it, it doesn't work? What software is the server running?
The error suggests that a reference might be missing. Did you download the Generator package and then make any modifications?
Allan
Hi Allan,
Yes, you got it right. Its on Windows Server 2012 R2.
I downloaded the Generator package (ASP.Net & SQL) and did some modifications on Javascript and just added the database connection strings. Other than that, I did not touch anything. Works perfectly fine on VS IIS Express, but throws 404 and 500 error when I switch to Local IIS.
PS: I am not very sure if i have to modify something on my web.config before publishing to local IIS.
You shouldn't need to. Do you have .NET Framework 4.5 installed on the remote server?
Allan
Yes its installed.
Allan/Kevin,
I just checked, its the problem with SQLServer (Even tried with SQL Express - didnt work).
I changed my database to MySQL and it works fine on Local IIS. (Works with Azure SQL too).
I believe there's some access related issue on SQL Server.
Can you suggest me if i have to configure something on database server or my web.config to make it run.
Does the user name you are using in the connection string have access to the database that is also defined in the connection string? Is the password correct in it? What is the error that SQL Server is throwing? It sounds like it might be a permissions problem and you need to update the user's access rights.
Allan