Happy Again – debugging WSE2 Samples

Now that I have just refreshed the WSE2 samples with their original versions (thanks Bristowe), I am very happily debugging through them to see Don Smith’s lovely code for creating and issuing custom security tokens. My frustration had a lot to do with the fact that I know there is a goldmine of info in the samples and stepping through them with the debugger brings me so much farther than just reading explanations that don’t cover every single step.

And now I grok this stuff well enough to dare to dig in again and start mucking with it.

Here are some tricks about debugging into web services and into httphandlers that you never really understand until you have to use them.

Debugging web services from a windows client is sometimes a real mystery. Sometimes it works, sometimes it doesn’t and I never really understood.

I had this experience when debugging into the custom username token manager – sometimes I just couldn’t get at the code. (John Robbins ….I need to read your book cover to cover and that is all there is to it!!!) Hervey Wilson reminded me of Debug/Processes which helped enormously. I learned finally how to attach to a process that I couldn’t get into normally to debug. With the custom security token it was a bit different since I needed to attach to an httphandler that was not loaded before I needed it. Here you just need to attach to the aspnet worker process (aspnet_wp.exe) when you are at a point in your code that you know it is being used – and tada – you  can debug into the http hander. In the case of the CustomXML Security Token Sample, the httphandler is where all the goodies were.

Posted from BLInk!

  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.