views:

955

answers:

6

I am new to visual studio/asp.net so please bear with me. Using vs 2005 and asp.net 3.5. I have vs installed on the production server. If I set the start option for the site to "use default web server" when I go to debug my website vs tries to open the site at http://localhost:4579/project and returns 404. If I set start option to "use custom server" and specify the correct path to application (the way I would hit the site from the outside) vs is unable to run debug and returns error "Unable to start debugging on the web server. Logon failure: unknown user name or bad password". I am running vs as an administrator on the production server. I thought maybe I needed to set user permissions in the visual studio remote debugging monitor but my admin account was already there. I checked IIS and made sure the application configuration/debugging "enable asp server-side script debugging" was checked. Web config is also set debug="true". Clearly I am missing something.

EDIT >Running windows server 2003

+4  A: 

Do this...Instead of trying to debug by hitting F5

  • Go to Tools
  • Attach to Process
  • Click View Processes from all users
  • Ensure you are selected only for Managed Code
  • Select "W3WP.EXE". This is the ASP.NET Worker process.
  • Click attach.
  • You are now attached and debugging, go refresh the page in a browser and it should hit your breakpoints.
FlySwat
Okay that worked for the code behind file. I have some javascript files with breakpoints that are not getting hit. Do I need to do something different for js?
mrjrdnthms
JS runs on the client, not the server. You need to use a client debugger like FireBug to stop on those.
FlySwat
VS 2008 (pretty sure 2005 as well) will also debug the client side Javascript - just attach to the IE process and make sure the debugger is set for script debugging, not native. Also make sure that IE is set to allow script debugging (a checkbox in the advanced settings needs to be *uncheckd*).
Michael Burr
A: 

Are you running on Vista or Server 2008? I'm not sure about Vista, but when I was running Server 2008 I had permission errors when trying to debug when I launched VS as my regular user. The solution for me was right-clicking on the VS icon and selecting 'Run as Administrator'.

RKitson
A: 

Please specify your OS. Do you have Vista/Win2008 and IIS7?

EricSch
A: 

The account you are running under needs to be part of the developer user group. Otherwise you will not be able to debug correctly.

jdecuyper
He's running the debugger as a box admin, its not that. He needs to attach the ASP.NET process.
FlySwat
Sorry! You're right.
jdecuyper
A: 

Have you checked that you have Integrated Windows Authentication switched on for the required web site. This is required for debugging.

Note: You can have this and the Annonomus access enabled at the same time. This means the site sees logged in users as their user account and not logged in users as the Annonymous account. Not logged in users will only see a login box if the application tries to access something that requires a login.

To debug Javascript you have to enable it in IE's settings. Uncheck both the settings at "IE->Tools->Options->Advanced->Browsing->Disable script debugging" before debugging.

Martin Brown
A: 

thnks gyus..