Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


October 2001

Preventing IIS from Prompting for User Credentials

RSS
Subscribe to Windows Web Solutions | See More Domains Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

On my system, I don't want to require domain users to enter their username and password when they use IIS 5.0. Therefore, I've set my site to allow only Integrated Windows authentication. Now, when a user types the NetBIOS computer name, the system doesn't prompt the user for a username and password. However, the system still prompts a user for a username and password when the user on a Windows 2000 client accesses the Web site using an IP address or the Fully Qualified Domain Name (FQDN) of the Web site. How can I prevent the system from prompting users for a username and password when they use the FQDN or IP address of my servers?

One benefit of using Integrated Windows authentication in IIS 5.0 or Windows NT Challenge/Response authentication in IIS 4.0 is that you can avoid forcing users to present credentials to log on to the server. When IIS requires a client to authenticate (e.g., you've disabled Anonymous authentication, or NTFS permissions require it), IIS attempts to use an intranet user's network credentials to grant access to the resource without prompting the user for credentials.

When IIS attempts to use intranet credentials, an exchange between IIS and the client browser that's transparent to the user occurs. The IIS end of this negotiation works well. However, managing the Microsoft Internet Explorer (IE) end can be a bit difficult when you want IE to use a Microsoft authentication method such as Integrated Windows or NT Challenge/Response.

One example of IE's idiosyncrasies is that IE 5.5 won't use Kerberos if you use an FQDN in the URL, although an earlier version of IE 5.x would. (For more information about this idiosyncrasy, see the Microsoft article "Kerberos Does Not Negotiate Using Internet Explorer 5.5 If an FQDN Is Used to Connect," http://support.microsoft.com/support/kb/articles/ q299/2/70.asp.) This idiosyncrasy could cause a well-running Kerberos authentication scheme to fail suddenly after you upgrade to IE 5.5. Authentication then falls back to the less-secure NT Challenge/Response authentication. Although IIS doesn't prompt users to provide credentials, your network is using a less-secure authentication.

To return to the question at hand, the Microsoft article "Error Message: HTTP 401.2—Unauthorized: Logon Failed Due to Server Configuration" (http://support.microsoft.com/sup port/kb/articles/q251/1/99.asp) details the problem that this question poses. Note that this article says that it's about IIS 5.0; it's really about IE. (The article also claims that you can't use Integrated Windows authentication across a firewall, but that depends on how you configure the firewall.) Nevertheless, the article's key point is relevant and states that if there is a period (.) in the URL, IE assumes that you're designating an Internet address and thus doesn't initiate authentication with IIS.

To make matters more confounding, if you use a proxy server and have gone through the trouble to set up IE to bypass the proxy server for local addresses, IE 5.x uses the proxy server anyway, even if the URL contains a period. (For more information about this bug, see the Microsoft article "Internet Explorer Uses Proxy Server for Local IP Address Even if the 'Bypass Proxy Server for Local Addresses' Option Is Enabled," http:// support.microsoft.com/support/kb/articles/q262/9/81.asp.)

Given the information in these articles, you can assume that IE's sole means for determining whether an address is local or remote is to check whether the URL contains a period. Clearly, this solution is incomplete. Other possible solutions to this problem are also limited. For example, IE does have a setting that controls how the browser behaves when IIS asks the browser to authenticate itself. To select this setting, choose Tools, Internet Options, then click the Security tab. Click Internet, then click Custom Level. Scroll down to User Authentication, which Figure 3 shows. By default, the Automatic logon only in Intranet zone option is selected.

To force IE to send credentials in the Internet zone, select the Automatic logon with current username and password option. When you select this option, IE automatically sends credentials when prompted if you've enabled Integrated Windows or NT Challenge/Response authentication. However, if the automatic logon fails, the system doesn't prompt users to enter correct credentials, which leaves them locked out of sites that they otherwise might have been able to enter had they been prompted.

Ultimately, the solution to this problem lies with the ability to add sites by name to the Intranet zone. You can enter your FQDN, complete with periods, and IE will treat it as an intranet site, even though it's external. In addition, you can use wildcards, so *.yourcompany.com will work for all hosts that use the form host-name.companyname .com. For more resources, see "For More Information."

End of Article



Reader Comments
Fabulous, Thanks for your help and describing topic so nicely and deeply.
Mohit

Anonymous User June 16, 2005 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

How can I stop and start services from the command line?

...

PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...


Security Whitepapers The Impact of Messaging and Web Threats

Why SaaS is the Right Solution for Log Management

Protecting (You and) Your Data with Exchange Server 2007

Related Events How IE7 & The New Extended Validation SSL Certificates Impact Your Site

Check out our list of Free Email Newsletters!

Security eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Related Security Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing