Previous Next

Thread: Getting w3wp to execute from the command line.

Last post 07-13-2008 11:32 AM by HassanSyed. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 07-08-2008, 6:31 AM

    • HassanSyed
    • Not Ranked
    • Joined on 07-08-2008, 6:18 AM
    • Posts 4
    • HassanSyed

    Getting w3wp to execute from the command line.

    Hello All,

     I've developed a chunk of code as a ISAPI filter initially and due to the nature of how filters work I need to port it over to a Extension (which will be run as a wildcard extension). I was able to debug my filter by attaching  to inetserv.exe. Before I can start the port I want to make sure I can debug the extension as well.

    I am doing development and testing on iis6 - ws2003 sp2 - VS 2005 via remote desktop.

    From my understanding there are two ways of doing it

    a) run iis6 in iis5 isolation mode load the extension and attach VS 2005 to inetserv.exe

    b) run without issolation mode with a single application pool/worker process. Then stoping the w3svc service(and thus the w3wp hosting the extension)  and running it from console with the "-debug" switch.

    Now I have some problems with both approaches. With a) I attach VS2005 to inetserv.exe and the symbols for my project dont seem to be loaded. This either means that the extension was not loaded for some reason (which I cannot pinpoint the reason for as there is no log trail in the event viewer) or that there is some other issue.

     I cannot say much about option b) because w3wp will not start on the command line, I am logged in via rdesktop as administrator (and I have added administrator to IIS_WPG as it was worth a shot).

     I think I want to get w3wp started in debug mode before I start wondering if my extension is compiling correctly etc. Hope you guys can help me.

    Thank you

     Hassan Syed


     

  • 07-08-2008, 11:52 PM In reply to

    Re: Getting w3wp to execute from the command line.

    This is my extent of knowlege on this.  Type w3wp /?  There is a debug flag.

    Usage: w3wp -s <site id> | -h [application host file] 
                               -w <optional root web.config file> 
                               -in <optional instance name> 
     
     -debug
       This option launches a worker process using the default
       application host config file.  By default, it will use
       site id 1.
     
     -s <site id>
       Optional parameter to use a siteinformation from the provided
       site id.
     
     or
     
     -h [Application host config filename]
       Launches a worker process using the specified application host
       config file.
     
     -in <Instance Name>
       Optional instance name to use.  Defaults to 'HWC-<PID>'
     
     -w <Root web config filename>
       Optional root web config file to use.

    Steve Schofield
    Windows Server MVP - IIS
    MCTS - Windows Hosting

    http://weblogs.asp.net/steveschofield
    http://www.iislogs.com
    http://www.orcsweb.com/
    Managed Hosting Solutions
    #1 in Service and Support
  • 07-09-2008, 8:33 AM In reply to

    • HassanSyed
    • Not Ranked
    • Joined on 07-08-2008, 6:18 AM
    • Posts 4
    • HassanSyed

    Re: Getting w3wp to execute from the command line.

    Hello Steve, thank you for the response.

    At this stage I have managed to get my extension loaded and stop at breakpoints.

    In response to your tip, the problem I was having was w3wp actually executing, when I run the command at the prompt it does nothing, just exits. It would be very usefull for me if I could get this to execute.

     Regards

     Hassan Syed

  • 07-12-2008, 11:05 PM In reply to

    Re: Getting w3wp to execute from the command line.

    Are you attempting to attach inside visual studio?

    Steve Schofield
    Windows Server MVP - IIS
    MCTS - Windows Hosting

    http://weblogs.asp.net/steveschofield
    http://www.iislogs.com
    http://www.orcsweb.com/
    Managed Hosting Solutions
    #1 in Service and Support
  • 07-13-2008, 11:32 AM In reply to

    • HassanSyed
    • Not Ranked
    • Joined on 07-08-2008, 6:18 AM
    • Posts 4
    • HassanSyed

    Re: Getting w3wp to execute from the command line.

     Both visual studio and windows debugging tools, I attach to either w3wp or inetinfo depending on the isolation level. The whole process of recompile restart IIS and attach is quite annoying. and its not possible to debug the init and termination of the filters/extensions this way.

Page 1 of 1 (5 items)
Page view counter