Thursday, 16 February 2012

Debugging Classic ASP in Visual Studio 2010 and IIS7.0

1. Installing the IIS 7

The first step of the process is installing the IIS7.0 in your environment. It is quite straight forward and you should be able to setup easily.

Control Panel --> Programs --> Turn On windows features --> IIS

Note: using the “inetmgr” command in start-up run dialogbox, you can find whether it is already installed there.



After installation, try to run the IIS default website. It will be using the port 80, if that process already not hijacked by different process. If it uses another port, make sure to remember it, because it will be using in later stage of this process. 

2. Configuring the ASP

In IIS7.0 Management Console, ASP section enable client-side and server-side debugging options. 


3. Setting the Application Pool 


Add a new application pool and set the .NET Framework version and managed pipeline mode as follows. 


Then under Advanced settings, add the current windows user as the identity.




4. Adding the classic asp website to IIS 7

Add the classic asp website, you wanted to debug to the IIS7.0. Make sure to include all content folders and files there.
























5. Exporting the classic asp website from the VS2010

Open the classic asp website in the VS2010 and set up the start-up project and page.

Then in VS2010 Website --> Start Options…





Note: Make sure to enable relevant debugging options from Debug --> Options and Settings





6. Attaching to process

Run the website from VS2010 (you have to run it as an admin), don’t forget to place some breakpoints to debug.

The final step is, attach the running processes of the classic asp website. Debug --> Attach to Process window, you have to locate the process w3wp.exe with Script, TSQL. Then attach and have fun with debugging.



5 comments:

  1. You are a great man..master piece of observation..
    Thank you so much it helped me a lot..:)

    Mangesh

    ReplyDelete
  2. It worked for me first time but its not working again. What could be the reason?

    ReplyDelete
  3. Hi : Thank you for your post regarding visual basic, I try and working fine.. Thanks

    ReplyDelete