Microsoft KB Archive/813615

= &quot;Logon Failure: Unknown User Name or Bad Password&quot; Error Message When You Try to Map a Site to a UNC Share =

Article ID: 813615

Article Last Modified on 12/3/2007

-

APPLIES TO


 * Microsoft Internet Information Services 5.0
 * Microsoft Internet Information Services 6.0

-



SYMPTOMS
If you create or configure a Web site or virtual directory to point to a remote UNC share from an Internet Information Services (IIS) 5.0 or IIS 6.0 Web server, you may receive the following error message:

IIS 5.0:

Unable to enumerate files and directories because the following error occurred: Logon Failure: unknown user name or bad password.

IIS 6.0:

Logon Failure: unknown user name or bad password.



CAUSE
The user who is logged on to the Web server does not have sufficient rights to the remote UNC share. If a Web site or virtual directory points to a remote UNC share, IIS tries to enumerate the file structure in the remote share with the identity of the user who is logged on to the Web server. This user must have access to the server and rights where the UNC share is located.



RESOLUTION
Make sure that the user who is logged on to the Web server has sufficient NTFS permissions on the remote share and has the &quot;Access this computer from the Network&quot; user right on the computer that has the remote share.



WORKAROUND
If the solution that is described in the &quot;Resolution&quot; section is not possible (for example, if the Web server and the file server where the UNC share is located do not belong to the same domain), you may want to create a local account with the same user name and password on both servers, and then add them to the Administrators group (for simplicity). You can then use that user to log on to the IIS server when you configure the Web site or virtual directory to map to the UNC share on the remote server.



MORE INFORMATION
Microsoft does not recommend using UNC mapped content on high-capacity Internet sites.

