.NET (C#) Impersonation with Network Credentials

I required a C# class to enable ad-hoc user account impersonation for accessing resources both on the local machine and also on network machines, which I’ve reproduced here. Of note, if you require impersonation in order to access network resources, you would intuitively select the logon type of LOGON32_LOGON_NETWORK, this however doesn’t work, as according to … Continue reading .NET (C#) Impersonation with Network Credentials

Debugging .NET Serialization Code

Just what is your XmlSerializer doing? You can find out by debugging the serialization code which is generated automatically at runtime; 1. Modify your .config file to include the following snippet 2. Rebuild your code and set a breakpoint on or just after where you create an instance of the XmlSerializer, but before you call … Continue reading Debugging .NET Serialization Code

Showing an Assemblies Fully Qualified Name

To show the fully qualified name of an assembly you can use Lutz Roeders Reflector, or you can write a simple console application to do the same thing. namespace showtypeinfo {    class Program    {       static void Main(string[] args)       {          if (args.Length < 1) {             return;          }          Assembly … Continue reading Showing an Assemblies Fully Qualified Name