A Performance Comparison of ReaderWriterLockSlim with ReaderWriterLock

If you have ever used the System.Threading.ReaderWriterLock to achieve synchronised access to shared resources which are frequently read but infrequently updated then you probably know why we have created a new Reader/Write lock. In this MSDN Magazine’s concurrent affairs column, Jeffery Richter explains some of the short comings of the existing ReaderWriterLock in .NET Framework….


WCF Authentication: Custom Username and Password Validator

There are a number of authentication techniques supported by WCF. For instance Windows Authentication, X509 Certificates, Issued Tokens, and Username and Password are all mechanisms that can be used for authentication. These client credential types are configured as part of the binding configuration for an endpoint. For example the config section below customises the netTcpBinding…


AzMan Data Store through COM Interop

If you have an ASP.NET application, you can use the AuthorizationStoreRoleProvider which adheres to the Role Provider model expected by ASP.NET and retrieves role information from Microsoft Authorization Manager (AzMan). AzMan itself is a COM based application and all communications with the store occur through COM Introp exposed in Microsoft.Interop.Security.AzRoles namespace. If you decide not…


Reversible Command Pattern

The Reversible Command design pattern encapsulates a request or an operation as an object, thereby allowing you to queue, log, and serialize requests to a store (volatile or durable) and create undo or rollback requests. With this pattern you basically log all the requests and execute them through a command invoker entity. Why is this…


ThreadAbortException and Unmanaged Code

As you are probably aware Thread.Abort() raises a ThreadAbortException in the thread on which it is invoked, to begin the process of terminating the thread. Please note that if Abort is called on a managed thread while it is executing unmanaged code, a ThreadAbortException is not thrown until the thread returns to managed code. That…


How the Execution Timeout is managed in ASP.NET

As you are probably aware, it is possible to specify the execution timeout of an ASP.NET request through the config file. All you need to do is to set the executionTimeout attribute on the httpRuntime element in either the web.config (for one ASP.NET application) or even the machine.config (to affect all ASP.NET applications): <httpRuntime executionTimeout=“200“/>…