Sponsored By Aspose - File Format APIs for .NET

Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!

Debug Server Control

A student and I wrestled with a Server Control issue tonight.  We couldn’t debug the server control, despite following the conventional wisdom of having 2 projects (one control project and one asp.net project), referencing the control project from the asp.net project and adding the control to a page, and launching the asp.net project as the “Start Up” project with breakpoints set in the control project.

I googled for “Debug Server Control” along with asp.net, c#, and vb.net and found very slim pickings — mostly irrelevant stuff, so this post is partially an attempt to fill the void . . .

We solved our problem by deleting the control project assembly and debugging file (.pdb file) from the bin directory of the asp.net project.  We ran our asp.net project again (as “Start Up” project, again) and the referenced assembly was automagically added to the bin directory again.  This time it worked.  It works ok from now on.

Now, I know if you’re using an external assembly you change the control code you’ll have to make sure the assembly version is appropriate in the client applications, but this is the first I’ve seen of this when the projects were contained in the same Solution and the asp.net application was referencing the control project from within the solution.  The fact our rebuild generated fresh versions of the assembly (and the .pdb file) indicates VS.Net is sophisticated enough to recognize the relationship between the two projects.


Anyway, by deleting the referenced assembly and rebuilding our project, it solved the problem.

Happy .Netting

This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

3 Responses to Debug Server Control

  1. Tim says:

    Nice one!

  2. http://dotnetjunkies.com/weblog/grant.killian says:

    Tim, I’m working on an article for DotNetJunkies that demonstrates an asp.Net server control and a testing project — it should be up in a week or so. Stay tuned.

  3. Tim says:


    Any chance of a sample project as I cannot seem to get mine to work?



Leave a Reply