I've seen a few sites mentioning techniques for debugging within a Siteminder world.
This may be a little out dated since it uses Visual Studio 2003, but I'm pretty sure the technique is the same.
Without further ado, here's the steps to do debugging:
- Make sure Visual Studio is not running. It's not mandatory, but it makes it an easier approach.
- Disable Siteminder. This is usually done via config file called WebAgent.conf and is generally located in C:\Program Files\netegrity\webagent\bin\IIS\. Look for a line that looks like EnableWebAgent="YES". Change "YES" to "NO". Note: Case is VERY important!
- Restart IIS. Normally, this is done through the IIS management console, but a reboot will also work. However, that approach won't work later on.
- Start your Visual Studio instance and your Siteminder protected project.
- Next, after the project has fully loaded, change the "NO" back to "YES" and restart IIS. (See why rebooting doesn't work?)
- Now, debug using "Attach to process" and attach to the ASP.NET worker process for your Windows version.
This is a rather simplistic approach, but it works very effectively. It's a pain, but once you get used to it, it becomes second nature. One of these days, I'd like to write a script that automates this, but for now I'll settle for the extra manual steps.
Happy coding!
Update:
In VS 2008, most of these steps are not needed. In particular, steps 1 through 5 are not needed, You just need to make sure that Siteminder is enabled and you attach to the ASP.NET worker process running through IIS. This will not work in the "built in" web server in VS 2008.
Good luck!
No comments:
Post a Comment