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. (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: Logo

You are commenting using your 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 )

Connecting to %s