0

Creating simple asp.net core 2.0 web api application (RESTful services only) that uses windows authentication. In my controller I defined a simple test method which just returns the username (json format). When I used a restful client such as fiddler and invoke this method, e.g. http://localhost/webapi/testservice, I get a 401 Unauthorized error. However when I put that url in a Web browser, it invokes successfully and returns the user back.

My question is, why does invoking the service work on the browser but not in a REST client like Fiddler? Is there an additional header I need to add in the client when invoking the service?

Nick Albrecht
  • 16,607
  • 10
  • 66
  • 101
Los Morales
  • 2,061
  • 7
  • 26
  • 42
  • It would help if you provide us with an [mcve]; without it we not help with much certainty. – Jeroen Aug 22 '17 at 22:19
  • this might help u -- https://stackoverflow.com/questions/26430045/how-to-pass-windows-authentication-credential-from-client-to-web-api-service – Mithun Pattankar Aug 23 '17 at 09:58
  • @MithunPattankar I saw that link already but is not useful on my end since their solution of impersonation doesn't work in .NET Core – Los Morales Aug 23 '17 at 13:55
  • 1
    This looks like a duplicate of https://stackoverflow.com/questions/3670332/using-fiddler-with-windows-authentication – Tratcher Sep 07 '17 at 03:24

0 Answers0