Archive for the ‘webapi’ Category

webapi debugging fail? on simple GET?

March 15, 2017

the situation:
* web api 2
* simple project built from template – the Value controller works as expected

I added a controller … and I’m still learning. (aren’t we all)

I tried calling action methods from my controller … I won’t show my apiconfig, because it’s not relevant to my point.

My point is, I got to a situation where it appeared that the debugger would not step into my controller methods.

Or would it?

One thing I learned is that if I put [HttpGet] attribute tags on multiple methods in the controller, then the original “Get” method may not be called. After I removed those attributes, then the default Get method was again called.

a good read: