Recently, the previous WebAPI project was released to the server, and the database was changed from SQL Server2008 EXPRESS to SQL Server2000. However, when querying by page, the server throws a "500 error ", however, the error details are not displayed.CustomErrorsThe detailed information is still not displayed. Because the project is published on the server, there is no way to debug it, and the server is windows20003, the page cannot be remotely debugged, write try... Catch... Capture the error in the action and throw it. The error still cannot be obtained. If the error details are not obtained, the error is not modified. Then, search for a solution on the Internet to find a WebAPI error, only 500 is thrown, and no detailed information is contained. The error details can be obtained only when HttpResponseException is thrown. The Code is as follows:
Resp =
Finally, according to the error details, we found that the new version of nhib.pdf does not support SQL Server2000 paging queries, and another SQL Server2005 error solution is installed.
When I wrote this record, I just thought that it would not be so troublesome. I could output the detailed content of the Exception directly and make a detour...