How do I debug a web site with VS2005?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alan Silver

    How do I debug a web site with VS2005?

    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.

    --
    Alan Silver
    (anything added below this line is nothing to do with me)
  • Ken Cox [Microsoft MVP]

    #2
    Re: How do I debug a web site with VS2005?

    Hi Alan,

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

    Ken
    Microsoft MVP [ASP.NET]


    "Alan Silver" <alan-silver@nospam.t hanx.invalid> wrote in message
    news:z1jEhRUQHX oEFw+X@nospamth ankyou.spam...[color=blue]
    > 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.
    >
    > --
    > Alan Silver
    > (anything added below this line is nothing to do with me)[/color]


    Comment

    • Alan Silver

      #3
      Re: How do I debug a web site with VS2005?

      In article <uSvtC3kmGHA.14 88@TK2MSFTNGP02 .phx.gbl>, "Ken Cox [Microsoft
      MVP]" <BANSPAMkjopc@n ewsgroups.nospa m> writes[color=blue]
      >Hi Alan,
      >
      >You may need to switch anonymous access off for that. Worth a try.[/color]

      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
      [color=blue]
      >Ken
      >Microsoft MVP [ASP.NET]
      >
      >
      >"Alan Silver" <alan-silver@nospam.t hanx.invalid> wrote in message
      >news:z1jEhRUQH XoEFw+X@nospamt hankyou.spam...[color=green]
      >> 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.
      >>
      >> --
      >> Alan Silver
      >> (anything added below this line is nothing to do with me)[/color]
      >
      >[/color]

      --
      Alan Silver
      (anything added below this line is nothing to do with me)

      Comment

      • Alan Silver

        #4
        Re: How do I debug a web site with VS2005?

        In article <z1jEhRUQHXoEFw +X@nospamthanky ou.spam>, Alan Silver
        <alan-silver@nospam.t hanx.invalid> writes[color=blue]
        >Sorry if this is a FAQ, but I couldn't find an answer by searching.[/color]

        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

        --
        Alan Silver
        (anything added below this line is nothing to do with me)

        Comment

        Working...