webapi debugging fail? on simple GET?

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: https://docs.microsoft.com/en-us/aspnet/web-api/overview/web-api-routing-and-actions/routing-in-aspnet-web-api


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: