asp.net-coremodel-view-controllerdatatablesasp.net-ajax

Runs in Visual Studio but returns 404 error when deployed in IIS


Hi everyone I hope everyone and safe and doin’ well.

I just really need your help with an error I have been fixing for less than 2 weeks. I have created Asp Net Core Web-App, when I run it with IIS Express In V-Studio it runs well but when I deployed it into IIS I got 404 Status error from my Datatables.

Then when I open the Developer’s Tools on Console and Network Tabs I found out the 404 error and I think that is the cuase of error (please see Images below)

Cause of error: Jquery.min.js

Console Tab

Datatable in my IIS

I am new in IIS Deployment, I really appreciate your help. Just let me knkw what should do.

Thanks, Kart

I tried checking the Ajax Url and it seems nothing wrong. But i still need your suggestions.

I tried also checking on a browser if my Ajax returns a data and it did, it returned what data I expect.


Solution

  • The root cause for this issue is using the wrong path.

    The correct path should contains the project_name.dll and web.config files.

    Then the asp.net core runtime can find the startup file.