ShowContexts (.NET 2.0 Version)

In ASP.NET you have to deal with three identities (Process, Thread and Managed Identity).  In DevelopMentor‘s “Essential .NET Security” course i use this little tool, originally written by Keith, to show these identities.

I updated the code to .NET 2.0. You can see how to “RevertToSelf” using managed code, as well as the new overload in WindowsIdentity.GetCurrent() to figure out if you are currently impersonating.

I included two formats – ASPX and ASMX. The ASMX is especially useful to diagnose double hop scenarios.

ShowContexts.zip (1.39 KB)

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s