I think this is worth enough to show how to debug share point controls (User control, Event hander or web part). It will reduce your time on finding out the issue.1. First you have to build the application and put your DLL in GAC or BIN folder of your web application2. Then you have to put that web part in share point. If it an event handler you have to register it3. Then you have to make a break point in the code where you want to break the code for debugging(Please make sure the current version of the code and the dll you placed in BIN or GAC are same)4. Then you have to go to Debugïƒ Select Attach to process 5. From the next screen you have to select all the W3wp.exe process6. Click Attach 7.. Make an IIS reset in the share point server and refresh your page where you deployed your web part.8. Now when the web part loads you can see it is stopped on the section where we added the break point9. Now you can debug the share point web part as normal as you debug In ASP.Net
Destin Joy is a Microsoft MVP in SharePoint Server. He is a blogger, author and a Speaker.He also holds Mindcracker MVP and Microsoft Certified TrainerYou can reach him @ Destin.Joy@hotmail.com
C# Corner. All contents are copyright of their authors.