How do I debug a web site with VS2005?

A

Alan Silver

Hello,

Sorry if this is a FAQ, but I couldn't find an answer by searching.

I have been using VWB Express for a while, and have just installed
VS2005 Professional. I tried to open an existing web site as an IIS
project instead of a file-based one. I want to debug it in VS via IIS,
using the correct host header name.

Anyway, when I hit f5, I got a message saying... "Unable to start
debugging on the web server. Logon failure: unknown user name or bad
password. See help for more information."

I am running IIS6 on Windows 2003 Server, I am logged in as
Administrator, and the web site has integrated Windows authentication
set. VS2005 is installed on the same machine as IIS.

Any ideas what's going wrong? I'm sure this is really simple, but I
can't find an answer.
 
K

Ken Cox [Microsoft MVP]

Hi Alan,

You may need to switch anonymous access off for that. Worth a try.

Ken
Microsoft MVP [ASP.NET]
 
A

Alan Silver

"Ken Cox [Microsoft said:
Hi Alan,

You may need to switch anonymous access off for that. Worth a try.

Thanks, but it didn't help. I'm a bit puzzled why a fresh installation
of VS shouldn't be able to debug. Shouldn't it be set up automatically?

Any other ideas? Thanks again
Ken
Microsoft MVP [ASP.NET]
 
A

Alan Silver

Alan Silver said:
Sorry if this is a FAQ, but I couldn't find an answer by searching.

OK, having done yet another search, I found an answer. Hope this is of
some use to someone...

According to KB article 896861, which describes this problem...

"This issue occurs if you install Microsoft Windows XP Service Pack 2
(SP2) or Microsoft Windows Server 2003 Service Pack 1 (SP1). Windows XP
SP2 and Windows Server 2003 SP1 include a loopback check security
feature that is designed to help prevent reflection attacks on your
computer. Therefore, authentication fails if the FQDN or the custom host
header that you use does not match the local computer name."

They suggested two methods to solve the problem, one to disable the
security check, and one to add each individual host header into the
registry. The second would be a pain as I work with multiple host
headers. However, the first method suggested worked fine for me. I did
the registry change, rebooted and (subject to the one issue described
below), it worked fine.

I should point out that my machine is a development machine, not
publicly accessible from the Internet and protected by a firewall. I
would not recommend this solution on a production server, or one
available to the Internet.

The only other problem I had was that when I tried debugging, I got an
error that the remote debugging monitor was not running. I started it
manually from the VS tool submenu and debugging worked. This was
obviously not an optimal solution, as I would have had to start this
tool up every time I started VS, but looking in the help for the remote
debug tool told me that it could be started as a service. You do this by
running the remote debug configuration tool (next entry below the tool
itself in the VS tool submenu). I left it running as LocalSystem, which
worked fine.

Hope this is of use to someone
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top