3
votes

I have the following settings:

Web.config

Authentication Mode = "Windows"

Virtual Directory -> Enable anonymous access - UNCHECKED -> Integrated Windows authentication - CHECKED

When a user goes to the default page on the intranet, he gets prompted to enter the user name and password even though he has already been authenticated

**UPDATE: To clarify what I am doing - We have an application that is set to windows authentication = forms - There was a request that for certain servers in the intranet, we would want to bypass the login.aspx page - All that the login.aspx page does is, grabs the windows username, checks the database, gets the forms username and password and lets the user log in - I am using User.Identity.Name to get the windows user name to do a mapping

**

6

6 Answers

4
votes

Did you turn on impersonation?

<identity impersonate="true" />
1
votes

Check the file system permissions. Even if they are authenticated they can be prompted if they don't have access to the files.

1
votes

Also make sure that when you are viewing the site in Internet Explorer that the zone in the status bar says "Intranet Zone". Otherwise it won't log you in by default.

0
votes

Another consideration is Kerberos authentication only survives 2 hops. In this case you can use Kerberos/NTLM authentication if your AD is setup to handle the authentication correctly you should be able to pass the token along farther.

0
votes

Correct me if I'm wrong, but wouldn't the aspx page get the IIS user?

0
votes

You must use Internet Explorer as the client if you want to avoid any login at all.
Also, as David mentioned, the site must be in the 'Intranet' Zone for IE to automatically send your windows credentials. A site will be in the 'Intranet' zone if it uses a one-word servername. Otherwise, you must add it to the list of sites. See Internet settings in windows.

Firefox will prompt you for credentials (But they can be autocompleted).