1

I have an API and web application hosted on the same IIS server. When I try to execute an API method inside the server, it returns "401 unauthorized". When I try to execute an API method outside the server (while debugging) it works just fine. I'm using NTLM authentication for the API.

UPDATE: This is working when I disable NTLM authentication but having it (NTLM) enabled is one of the requirements. :(

Please help me. :(

tereško
  • 58,060
  • 25
  • 98
  • 150
Robert
  • 11
  • 2
  • 1
    Sounds reasonable - server-to-server would usually come with app pool account credentials which unlikely to be authorized by your WebAPI service. Not really sure if you expect it to work... – Alexei Levenkov Dec 21 '15 at 07:26
  • So are you saying that I can't have my web api and web application inside the same IIS server? – Robert Dec 21 '15 at 09:40
  • To add, this is working before I enabled NTLM authentication. The problem starts when I enabled it. Need your advise guys if what I'm trying to do is feasible. :( – Robert Dec 21 '15 at 09:56
  • I think you may find some guidance here: http://stackoverflow.com/questions/18107044/401-unauthorized-error-web-api-mvc-windows-authentication – selganor Dec 21 '15 at 10:12
  • Thanks selganor. I'll read it. :) – Robert Dec 21 '15 at 14:29

0 Answers0