Prompted for a username and password when browsing to an IIS virtual directory
April 17, 2011 12:50 AM   Subscribe

Why do I get prompted for a Windows username and password when I connect to a virtual directory under IIS?

I'm an IIS/Win7 n00b. I have IIS 7.5 running on Windows 7 Pro on a dev box. I am doing some work on a web application that uses a virtual directory in IIS.

When I point a browser at the root IIS website, I get the standard IIS welcome screen. However, when I instead browse to the webapp virtual directory (via intranet, internet, localhost doesn't matter), I get prompted for a Windows username and password. Why is this? How do I prevent it?

When I enter my standard Windows login details, I get to the webapp without further problems. The webapp has it's own authentication built-in, so I'd prefer to avoid logging in twice.
posted by Ritchie to Computers & Internet (3 answers total)
Best answer: IIS has to provide Windows credentials of some kind to its underlying filesystem. If it has "integrated Windows authentication" turned on, as it does by default, it gets those credentials from the end user. It has other authentication schemes. Pick the one that works best for you.
posted by flabdablet at 4:15 AM on April 17, 2011

More here.

If you don't want to mess with IIS's authentication settings, you'll need to make sure that the folder that backs your virtual directory has the appropriate NTFS permissions set for Guests (this is a security group that includes the user account IIS will try before requiring further authentication).
posted by flabdablet at 4:21 AM on April 17, 2011

Response by poster: That did the trick! I went into inetmgr and enabled Anonymous Authentication for the relevant site. Didn't have to change any underlying NTFS permissions. Restarted IIS and it worked. Thanks!
posted by Ritchie at 1:44 AM on April 18, 2011

« Older Awesome Android themes?   |   Please help me binge by giving me your high volume... Newer »
This thread is closed to new comments.