1
I am developing an ASP . NET MVC application whose access permissions will be managed from parameters set for users on Active Directory (AD).
To search for this data from AD I developed methods that send the user’s Username (in our case a registration) and return the complete data (department, full name, etc.).
Authentication is performed through the Windows Authentication, and the Username I search through the following code in the method Session_start class Global.asax:
var matricula = (Request.IsLocal && HttpContext.Current.IsDebuggingEnabled) ? Environment.UserName : User.Identity.Name.Split('\\')[1];
My web.config is configured as follows:
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
</system.web>
The point is that even using the Windows authentication the system opens back and forth an authentication form generated by the browser, in which the user enters his user and password to occur the re-authentication in the company’s network.
Note: In the company we basically use the Mozilla Firefox and the IE (the Chrome is used in only a few units/branches). We need the authentication rule to fit both browsers. The tests I did were on Firefox.
However, considering that this is an application on the company’s intranet, the business rules and the fact that the user has already logged in to the domain of the company, we felt that such a need for authentication should not be necessary.
Considering this situation, I ask for help to clarify if there is any configuration error in the project that is causing this sporadic opening of the Browser authentication form or if any configuration is missing.
Which browser are you using for testing Windows Authentication?
– Randrade
Good afternoon. Here they use Firefox and IE in every company, so the system should run with these rules in both browsers. The tests were done with Firefox. I will update the question with this info.
– Arthur Leite