0

I created my app using a template. After that i managed to connect it with an existing database. Then i tried to add Identity so that i will be able to authorise and authenticate users of the application. I tried to do that following the instructions of "shyamal parikh" in this post Adding ASP.NET MVC5 Identity Authentication to an existing project

My problem is that now i get a 401 error unless i got to solution explorer (in VS) and disable the windows authentication. But when i do that all the users have unrestricted access to the whole application.

I assume that the problem has to do with that solution that i performed but i cant comment directly there.

Can anyone give me a hint as to what i might be doing wrong?

Community
  • 1
  • 1
lefteris
  • 13
  • 5

1 Answers1

0

Do you have windows authentication installed on your computer? Maybe adding that might help. Here are the instructions-

https://www.iis.net/configreference/system.webserver/security/authentication/windowsauthentication/providers/add

Also look at your event viewer, you might have some hints there.

MoXplod
  • 3,813
  • 6
  • 36
  • 46
  • There is no windows authentication node in the IIS folder at the add features tree. But there is a windows identity foundation 3.5 which is not checked, i think its worth the try. I ll post back – lefteris Sep 22 '15 at 09:39
  • Enabling "windows identity foundation 3.5" on the add features window done the job, now the [Authorize] and [AllowAnonymous] are working as expected. – lefteris Sep 22 '15 at 10:03