Monday, April 27, 2009

How to debug event handler

1. stop IIS

2. Run-> cmd-> subst z: c:\windows\asembly

3. copy MyEventhandler.dll and MyEventhandler.pdb to z:\GAC_MSIL\MyEventhandler\1.0.0.0__publickeytoken

4. start IIS

5. go to site where the list is (!importan! before step 6.  so that w3wp.exe appears in the list of processes)

6. VisualStudio MyEventhandler.sln -> Debug-> Attach to Process -> w3wp.exe (UserName) Server\appPool_server (or something similar).

7. Now you can debug!!