i’m using asp.net / windows integrated authentication to ‘redirect’ my users (intra company) to different page.
In the web config i have
<authentication mode="Windows"/>
<authorization>
<deny users="?"/>
</authorization>
In the Load event of the main page i’ve this code:
Dim User As System.Security.Principal.IPrincipal
Dim username As String
User = System.Web.HttpContext.Current.User
username = User.Identity.Name 'Here i'm getting something like MyDomain\MyName
If User.Identity.IsAuthenticated Then
'goto main page
else
'goto another page (where to login)
'and print a label like "Welcome " + username + " to my webpage"
end if
The problem is that i get different beavhiours with different users and browsers.
For instance
- Internet Explorer 8,9 works well: it don’t ask me the username
- Chrome works also well
- Firefox: firefox ask me the username and password ( so i enter something like MyCompanyDomain\MyName and my password)
Am i doing something wrong ?
Googling this gave:
firefox-and-integrated-windows-authentication
You have to modify a setting in firefox to trust the site for this to work