WebApiController stopped working

WebApiController stopped working

ShirleyWShirleyW Posts: 16Questions: 4Answers: 2

I am using WebApiController to feed datatable and my code has been working in the localhost and even on the dev server (iis 7.5 Windows Server R2, .NET Framework 4.6.1, Visual Studio 2017, C#). When i post the same source code to another directory on the same dev server, the api stopped working. I have researched the app and tried different solutions to no avail. I am hoping perhaps you have seen this issue before and can point me to the right direction.

This question has an accepted answers - jump to answer


  • kthorngrenkthorngren Posts: 10,228Questions: 25Answers: 2,333

    looks like the page is looking for the datatables include files in a local directory on the server but is not able to find them. Maybe you need to copy them to another directory on your dev server. Hard to say since this is a server issue.


  • ShirleyWShirleyW Posts: 16Questions: 4Answers: 2

    Yes, I am looking for someone who have seen this 404 error and may know what is missing or may be some registry got corrupted (like which registry item to look for) etc.

  • ShirleyWShirleyW Posts: 16Questions: 4Answers: 2
    Answer ✓

    Just to share with others who may come across the same issue, This is missing from the web.config (asp.net 4.6.1, iis7.5)

    <add name="ExtensionlessUrlHandler-Integrated-4.0" path="." verb="" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

    Once this line is added to my web.config, the datatable was loaded, 404 error went away.

  • allanallan Posts: 52,493Questions: 1Answers: 8,010 Site admin

    Thanks for posting back. Good to hear you've got it working now.


This discussion has been closed.