views:

3009

answers:

3

I have an ASP.NET website and when I press F5 it automatically attaches to the ASP.NET Development Server, how do I attach to IIS worker process instead when I press F5?

+7  A: 

open project properties, go to the web tab and choose the option for IIS.

That actually starts an instance of the app in IIS and attaches the debugger. If you only wanted to attach to an existing IIS instance, shoose attach to process from the debug menu.

StingyJack
This only works for local IIS servers, right? Can't deploy/run/attach to worker process on a remote IIS server that way? (I ask this, because I'd like to be able to do that, but haven't found a reasonable method for doing so).
Troy Howard
Yes, local only. I think that to do what you are looking for would require you to publish the site, then attach to process on the remote machine. that requires remote debugger installed and probably some security headaches. Not fun....
StingyJack
A: 

go to the properties of the web application. Select the "Start Options" section, and change from "USe default web server" to "use custom server". Enter "http://localhost" in the base url.

(assumes VS 2008)

Danimal
+9  A: 

Debug->Attach To Process...

Select the aspnet_wp.exe process from the list.

ckramer
my preferred way as this avoid opening of a new window - and also keeps any session state that I already have in an open browser.
Samuel Kim
w3wp.exe in IIS 7.
Bryan Denny
w3wp.exe also for IIS 6 (in Server 2003)
Ricardo Villamil