Alex Kibler
Alex Kibler

Reputation: 4954

Publishing WebAPI to api folder of an angular application on IIS gives 500 errors on request.

I'm developing an angular application with a webAPI 2 backend. I'm developing them entirely independently (in different repositories, different directories, etc. The angular project isn't a visual studio project at all. I'm using WebStorm for it).

Both the front and the backend are working great when debugging, but I can't figure out how to get the backend to work when deploying. I deployed it to <application>/api and I put the angular application in <application>.

However, whenever I go to <application.com>/api, I get a 500 error. I also get a 500 whenever I call it from the angular app.

In IIS, I created a Website where the application lives. I clicked on the api folder and converted it to an Application. Is there anything else I need to be doing?

Upvotes: 1

Views: 887

Answers (1)

Alex Kibler
Alex Kibler

Reputation: 4954

I ended up having to follow this post to fix it.

  • Click "Start button"
  • in the search box, enter "Turn windows features on or off"
  • in the features window, Click: "Internet Information Services"
  • Click: "World Wide Web Services"
  • Click: "Application Development Features"
  • Check (enable) the features. I checked all but CGI.

IIS - this configuration section cannot be used at this path (configuration locking?)

Upvotes: 2

Related Questions