1

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?

Alex Kibler
  • 4,674
  • 9
  • 44
  • 74
  • what is the 500 error? Can you attach a debugger to your web api and get some details as to what may be happening? It's entirely too broad as of now to share any sort of guidance with you – scniro Sep 27 '15 at 03:01
  • I know.. sorry for the super vague-ness. What kind of debugger do you recommend? Outside of debugging through visual studio, I've never debugged in "production" – Alex Kibler Sep 27 '15 at 03:02
  • you should be able to get something in the network tab in your browser if you drill into that 500 error. Look for a raw response of sort and see if any details are in there. Also, you should be able to attach the debugger to IIS, look for debug => attach to process => `w3wp.exe` – scniro Sep 27 '15 at 03:08
  • Also I should have mentioned it's just the debugger from visual studio, w3wp.exe is the IIS windows process – scniro Sep 27 '15 at 03:13
  • Hey have you made any forward progress on this? Were you able to drill into that error some more? – scniro Sep 28 '15 at 14:27
  • I sadly was not. I was busy all day yesterday and haven't had time to sit down at my pc to try to figure it out. I'm going to look into it some more tonight. I tried publishing the API separately from the angular application and I still can't hit it, so I think it might be something with how my IIS is set up. – Alex Kibler Sep 28 '15 at 14:29
  • Hey, just wanted to let you know, this post solved it for me, in case you were curious: http://stackoverflow.com/questions/9794985/iis-this-configuration-section-cannot-be-used-at-this-path-configuration-lock – Alex Kibler Sep 28 '15 at 23:56

1 Answers1

2

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

Community
  • 1
  • 1
Alex Kibler
  • 4,674
  • 9
  • 44
  • 74