locked
Windows Authentication example RRS feed

  • Question

  • User-1304436123 posted

    Hi,

    Is there an example of using SPA with windows authentication? I'm struggling a bit...

    Thanks,

    Stevo

    Monday, March 3, 2014 7:11 AM

All replies

  • User197322208 posted

    Is there an example of using SPA with windows authentication? I'm struggling a bit...

    Windows Authentication is not related to SPA. Just put <authentciation mode=windows" and configure  IIS

    http://technet.microsoft.com/en-us/library/cc754628(v=ws.10).aspx

    Monday, March 3, 2014 7:22 AM
  • User-1304436123 posted

    I've tried that no success, still opens the login page on SPA

    Seriusly anyone can get it working just by switching the auth to windows? 

    On a standard MVC app it's simple, but SPA is refusing my login even after entering my windows credentials

    Monday, March 3, 2014 7:59 AM
  • User-105429085 posted

    If you use Windows Authentication, then it's server side authenticated.  VS2012's SPA template will just work if you turn on windows authentication.  VS2013's SPA template does not work this way, since it has logic in JavaScript to do form based Login.  So try to use VS2012's SPA template.

    Monday, March 3, 2014 12:23 PM
  • User197322208 posted

    I've tried that no success, still opens the login page on SPA

    You can replace code with any web framework. It will require also the login page.

    But what login page? The ask for credentials in the browser or the browser ask for credentials?

    Monday, March 3, 2014 12:42 PM
  • User1324782620 posted

    can you mention what HTTP response code you are getting using firebug? what are you using at server side WebAPI or MVC and also the SPA is developed in Angular or in any other framework?

    Thursday, May 1, 2014 2:04 PM
  • User-2007877324 posted

    If you are using Web API with your SPA, check this link on how to use windows authentication

    http://www.asp.net/web-api/overview/security/basic-authentication

    Monday, June 2, 2014 7:11 AM