MVC windows authentication grayed (greyed) out in project properties

1

I am trying to use Windows Authentication in a VS 2013, MVC 4 project that was originally done in VS2011.

It worked fine on VS2011, but when I moved to VS2013 on the same machine, using IIS 7 problems ensued.

I have windows authentication set in web.config (and anonymous authentication disabled):

<security>
  <authentication>
    <anonymousAuthentication enabled="false"/>
    <windowsAuthentication enabled="true"/>
  </authentication>
</security>

However, these attributes are grayed (greyed) out in the "f4" properties window for the VS2013 solution.

When I debug the program, I get the following error:

HTTP Error 500.19 - Internal Server Error with Error Code 0x80070021

I have tried editing C:\Windows\System32\inetsrv\config applicationHost.config per similar posts in forums, and restarting the services, but the problem still persists.

Does anyone know how to please solve this?

Thanks in advance.

c#
asp.net-mvc-4
iis-7
windows-authentication
anonymous
asked on Stack Overflow Dec 1, 2014 by JosephDoggie • edited Oct 6, 2015 by Mohit Shrivastava

2 Answers

2

What works for me is the following line in web.config -->

<system.web>
    <authentication mode="Windows" />
</system.web>
answered on Stack Overflow Dec 1, 2014 by ejhost • edited Oct 6, 2015 by Mohit Shrivastava
1

It appears that upgrading an MVC project from VS 2011 to 2013 (at least if this happens) is not an easy thing to do. I finally punted and started a new VS 2013 project and imported various controllers, views, etc. into that project, which actually worked surprisingly well. If you reach this page in a search and some of the other sites with answers have been failing for you, you may wish to do likewise.

answered on Stack Overflow Dec 2, 2014 by JosephDoggie • edited Dec 5, 2014 by JosephDoggie

User contributions licensed under CC BY-SA 3.0