Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 04, 2013 02:17 AM by BrockAllen
Dec 26, 2012 08:00 AM|LINK
How to debug Web API controller method with [Authorize] attribute in fiddler?
Adding "Authorization: Basic xxxxxxxxxx" to the HTTP head also get a response code of 401.
So how to debug API controller method with [Authorize] attribute in fiddler?
And also, to call API controller method with [Authorize] from embedded client? Is there a best practice?
Dec 26, 2012 03:26 PM|LINK
It sounds like you're debugging directly from fiddler (rather than some client code you've written). So either remove the attribute while testing (assuming you're on a dev box) or you'll need to pass a valid authorization header.
Jan 04, 2013 02:11 AM|LINK
Some resources are user-specificed, so remove [Authorize] may cause User.Identity, etc., empty.
How to build a valid authorization header? Is there a guide? I think it is a common scene.
Jan 04, 2013 02:17 AM|LINK
I'd suggest watching this video on securing WebAPI: