I want to restrict the application to be accessed by one particular AD Group only. So I have implemented authorize attribute on the controllers and web.config as below. But the application is now not accessible to everyone including the AD group. Could anyone please help.
[Authorize(Roles = @"Domain\ADGroup")]
public class HomeController : Controller
<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider">
<providers>
<clear />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
I have also tried the response given in the post Authorization using active directory role provider MVC4 as below but that doesn't seem to have resolved. I am still getting the 401 unauthorised error
[Authorize(Roles = "Domain\\ADGroup")]
public class HomeController : Controller