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

Answers

  • kthorngrenkthorngren Posts: 21,324Questions: 26Answers: 4,949

    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.

    Kevin

  • 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)

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

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

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin

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

    Allan

This discussion has been closed.