Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. Debugging on Vista with IIS7 and VS2005 [modified]

Debugging on Vista with IIS7 and VS2005 [modified]

Scheduled Pinned Locked Moved Windows API
helpcsharpvisual-studioasp-netsysadmin
5 Posts 3 Posters 15 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    David Wulff
    wrote on last edited by
    #1

    I'm using VS 2005 on a 64 bit version of Windows Vista. I have installed IIS 7, and all of the IIS6 compatability options. I am unable to debug a web application by running it from VS2005 when it is running under IIS7. (When running under the ASP.NET development server tool it debugs fine.) I am able to attach to the relevant process though and debug it fine that way. What could be causing this? The application is not under inetpub\wwwroot, but I've done a test from the default location and it gives the same error: --------------------------- Microsoft Visual Studio --------------------------- Unable to start debugging on the web server. An authentication error occurred while communicating with the web server. Please see Help for assistance. --------------------------- OK Help --------------------------- Steps I've taken include: - Ensuring Windows Authentication is enabled for the application in IIS7. - VS2005 is running as an Administrator, and UAC is off anyway. - Granting Everyone full rights to the source directory. Remember, I can still debug the ASP.NET worker process if I attach to it directly. The error message isn't very helpful because web searches indicate it is a standard error for all sorts of problems. Does anyone else have any pointers because having to attach to the process each time is driving me mad. -- modified at 14:02 Tuesday 12th December, 2006 Richard found the fix for my problem - I needed to add localhost to my trusted sites.


    Ðavid Wulff What kind of music to programmers listen to?
    Join the Code Project Last.fm group | dwulff
    I'm so gangsta I eat cereal without the milk

    L 1 Reply Last reply
    0
    • D David Wulff

      I'm using VS 2005 on a 64 bit version of Windows Vista. I have installed IIS 7, and all of the IIS6 compatability options. I am unable to debug a web application by running it from VS2005 when it is running under IIS7. (When running under the ASP.NET development server tool it debugs fine.) I am able to attach to the relevant process though and debug it fine that way. What could be causing this? The application is not under inetpub\wwwroot, but I've done a test from the default location and it gives the same error: --------------------------- Microsoft Visual Studio --------------------------- Unable to start debugging on the web server. An authentication error occurred while communicating with the web server. Please see Help for assistance. --------------------------- OK Help --------------------------- Steps I've taken include: - Ensuring Windows Authentication is enabled for the application in IIS7. - VS2005 is running as an Administrator, and UAC is off anyway. - Granting Everyone full rights to the source directory. Remember, I can still debug the ASP.NET worker process if I attach to it directly. The error message isn't very helpful because web searches indicate it is a standard error for all sorts of problems. Does anyone else have any pointers because having to attach to the process each time is driving me mad. -- modified at 14:02 Tuesday 12th December, 2006 Richard found the fix for my problem - I needed to add localhost to my trusted sites.


      Ðavid Wulff What kind of music to programmers listen to?
      Join the Code Project Last.fm group | dwulff
      I'm so gangsta I eat cereal without the milk

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      David, not sure if these help or hinder... According to this http://weblogs.asp.net/scottgu/archive/2006/09/19/Tip_2F00_Trick_3A00_-Using-IIS7-on-Vista-with-VS-2005.aspx[^], "Running VS 2005 with "elevated" privledges won't be required if you use the built-in VS 2005 Web-Server (since it has reduced privledges already). It is only required when connecting and running/debugging with IIS locally." And according to http://www.brianpeek.com/blogs/archive/2006/09/09/499.aspx[^] " 1) In the "Internet Options" control panel, go to the Security tab. Add "http://localhost" to your list of "Trusted Sites" 2) Again, for "Trusted Sites", clilck the "Custom Level..." button. Change the value of User Authentication to "Automatic login with current username and password". 3) In the new IIS manager, ensure that the web application directory is both: a) in the "Classic .NET AppPool". b) has "Windows Authentication" enabled in the Authentication section. "

      D 1 Reply Last reply
      0
      • L Lost User

        David, not sure if these help or hinder... According to this http://weblogs.asp.net/scottgu/archive/2006/09/19/Tip_2F00_Trick_3A00_-Using-IIS7-on-Vista-with-VS-2005.aspx[^], "Running VS 2005 with "elevated" privledges won't be required if you use the built-in VS 2005 Web-Server (since it has reduced privledges already). It is only required when connecting and running/debugging with IIS locally." And according to http://www.brianpeek.com/blogs/archive/2006/09/09/499.aspx[^] " 1) In the "Internet Options" control panel, go to the Security tab. Add "http://localhost" to your list of "Trusted Sites" 2) Again, for "Trusted Sites", clilck the "Custom Level..." button. Change the value of User Authentication to "Automatic login with current username and password". 3) In the new IIS manager, ensure that the web application directory is both: a) in the "Classic .NET AppPool". b) has "Windows Authentication" enabled in the Authentication section. "

        D Offline
        D Offline
        David Wulff
        wrote on last edited by
        #3

        Richard A. Abbott wrote:

        In the "Internet Options" control panel, go to the Security tab. Add "http://localhost" to your list of "Trusted Sites"

        That one step was all I needed, thank you Richard! :cool: :rose:


        Ðavid Wulff What kind of music to programmers listen to?
        Join the Code Project Last.fm group | dwulff
        I'm so gangsta I eat cereal without the milk

        M 1 Reply Last reply
        0
        • D David Wulff

          Richard A. Abbott wrote:

          In the "Internet Options" control panel, go to the Security tab. Add "http://localhost" to your list of "Trusted Sites"

          That one step was all I needed, thank you Richard! :cool: :rose:


          Ðavid Wulff What kind of music to programmers listen to?
          Join the Code Project Last.fm group | dwulff
          I'm so gangsta I eat cereal without the milk

          M Offline
          M Offline
          Mike Dimmick
          wrote on last edited by
          #4

          To explain why you need to do this: IIS requires that users of the DEBUG verb are authenticated using Windows Authentication. IE 7.0 will only do Windows Authentication for trusted sites and for Intranet sites. If you're not on a domain, IE 7.0 doesn't use the Intranet zone, it's all treated as 'The Internet'. It isn't smart enough to convert 'localhost' or any other name which maps to the local machine to 'Local Machine zone' (and you might not want it to anyway since that would invoke Local Machine Zone Lockdown). The setting can be tweaked using the Security tab. Click Custom Level for The Internet, then under User Authentication, Logon, select 'Automatic logon using current username and password' rather than 'Automatic logon in Intranet zone only'. Obviously this setting is not recommended.

          Stability. What an interesting concept. -- Chris Maunder

          D 1 Reply Last reply
          0
          • M Mike Dimmick

            To explain why you need to do this: IIS requires that users of the DEBUG verb are authenticated using Windows Authentication. IE 7.0 will only do Windows Authentication for trusted sites and for Intranet sites. If you're not on a domain, IE 7.0 doesn't use the Intranet zone, it's all treated as 'The Internet'. It isn't smart enough to convert 'localhost' or any other name which maps to the local machine to 'Local Machine zone' (and you might not want it to anyway since that would invoke Local Machine Zone Lockdown). The setting can be tweaked using the Security tab. Click Custom Level for The Internet, then under User Authentication, Logon, select 'Automatic logon using current username and password' rather than 'Automatic logon in Intranet zone only'. Obviously this setting is not recommended.

            Stability. What an interesting concept. -- Chris Maunder

            D Offline
            D Offline
            David Wulff
            wrote on last edited by
            #5

            Thanks for that Mike, it makes perfect sense with hindsight. I will leave my Internet zone alone though - there's no need me for me to change that.


            Ðavid Wulff What kind of music to programmers listen to?
            Join the Code Project Last.fm group | dwulff
            I'm so gangsta I eat cereal without the milk

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups