I developed a simple ASP.Net MVC 4 application using Windows authentication to work on our company’s local network. It works great when deployed to IIS. But if I run the application through Visual studio, I get an error

This is what my Web.Config file looks like
<system.web>
<authentication mode="Windows" />
<roleManager defaultProvider="WindowsProvider" enabled="true" cacheRolesInCookie="false">
<providers>
<add name="WindowsProvider" type="System.Web.Security.WindowsTokenRoleProvider" />
</providers>
</roleManager>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime maxUrlLength="32767" maxQueryStringLength="32767" targetFramework="4.5" />
</system.web>
<system.webServer>
<modules>
</modules>
<security>
<requestFiltering>
<requestLimits maxUrl="32767" maxQueryString="32767" />
</requestFiltering>
</security>
For debugging, the application is configured to run using the "Local IIS Web Server" with the option "Use IIS Express", noted in the Application Properties → Web tab.
source
share