0

we have angularjs spa application. which calls asp.net web api with windows authentication. If user not logged in (401) browser prompt for credential.

But I need to show custom login page on 401. Can someone help on it.

Santhosh
  • 19,616
  • 22
  • 63
  • 74
  • Did you check this? https://stackoverflow.com/questions/21230417/capture-http-401-with-angular-js-interceptor – Brian Dec 13 '17 at 12:19
  • That said, I'm assuming you know that if your static resources require auth right now, you'd have to update that (ie. IIS) to allow them first. – Brian Dec 13 '17 at 12:21
  • I set http - withCredentials: true in angular and from iis and web api [ checking windows authentication] and returns 401 if not logged in. And browser shows credential prompt automatically. I don't want that and need to show custom page. – Santhosh Dec 13 '17 at 13:18

0 Answers0