I have an ASP.NET application on a web server but I keep receiving an error about the login. We have a security group (in Active Directory) that I (and many others) are a member of. In an attempt to have the server allow members of this group to have access to the application I have done the following:
IIS 10, Windows Server 2016, SQL Server 2019
Web.config
Connection string - Integrated Security = true
<add name="SensitiveDataLogEntities"
connectionString="metadata=res://*/Models.SensitiveDataLogEntities.csdl|res://*/Models.SensitiveDataLogEntities.ssdl|res://*/Models.SensitiveDataLogEntities.msl;provider=System.Data.SqlClient;provider connection string="data source=MySqlServer;initial catalog=SensitiveDataLog;integrated security=True;Trusted_Connection=yes;MultipleActiveResultSets=True;App=EntityFramework""
providerName="System.Data.EntityClient" />
Allow role = SDL_Users
<system.web>
<authentication mode="Windows"/>
<authorization>
<allow roles="SDL-Users"/>
</authorization>
</system.web>
As well as here:
<system.webServer>
<security>
<authorization>
<add accessType="Allow" roles="SDL-Users" />
</authorization>
</security>
</system.webServer>
HomeController
:
[Authorize(Roles =@"DOMAIN\SDL-Users")]
public ActionResult Index()
Web Server IIS
- Authentication:
Windows Authentication = Enabled
- Application Pool Identity:
ApplicationPoolIdentity
SQL Server security: group SDL-User
is a db_datawriter
to the database.
But when trying to view the app in Chrome, I get the following: