How to allow self-signed client certificates in IIS

IIS allows you to use client certificates but it may give you hard time if your certificate is wacky (e.g. self-signed). In the client-side, if you have a .NET application that wants to be more permissible on accepting server certificates, you can hook the event ServerCertificateValidationCallback and decide weather or not you want to accept…

5

How to escape {curly brackets} in URL Rewrite rule

There is no escaping character in an URL Rewrite expression, but here is how you include curly bracket within an URL Rewrite expression. For opening { curly bracket you will always require to use the UrlDecode function to generate the { character from its encoded value %7B, that is: {UrlDecode:%7B} For closing } curly bracket…

0

Disposing System.Threading.Timer

I guess there are many ways to dispose this a timer, I was looking for an efficient way of doing it and making sure that after the Dispose method was called I had no outstanding timer notifications. In Win32 there is the concept of timer-queue timers, and in that APi set, when a timer is…

1

NPR in Windows Phone

I just realized that forgot to use “NPR” as keyword for my “Tiny Radio” app; so here is this blog entry My first Windows Phone 7 app is “Tiny Radio” and what it does is to simply tune the closest NPR (National Public Radio) station based on your geographical location. All Windows Phone devices have…

2

URL Rewrite 2.0 Performance

Do performance work it is easy when you have the right tools for measuring gains or lost. I will share some thoughts about how to improve performance during rewriting, but please keep in mind that any change you do must be well thought and with performance numbers in hand. If you need advice, please use…

1

Getting the line number for a Faulting Application Error

It is possible to know the line where an application faulted even if it was not running under debugger or memory dump is not available. It won’t probably tell you why it failed, but it will give you at least a point where to start investigating. After the application failed, look at the Windows Event…

0

Enable code coverage in Visual Studio

For some reason, every time that I want to enable code coverage for a library that I’m unit testing, I found hard to remember how to enable this fabulous feature. Here are the steps (that work for me): Double click the [Local].testsettings file in the Solutions Items folder in the Solution Explorer window. In the…

4

Registry values for IIS URL Rewrite

The following registry values can be set for the IIS URL Rewrite module and will affect the global behavior of the module; use them at your own risk 🙂 All these values (DWORD) can be set under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite MaxBackReferences – By default 31 (maximum value). Defines the maximum number of back-references that…

0

System.ComponentModel.Composition Example

I started playing with the .NET Framework 4.0 composition namespace (also known as MEF) and I want to share the most simple example I could write. The program prints out the providerName field, but the actual value is provided by the ExternalProvider class. The CompositionContainer class is able to wire the ExternalProvider.Name property and the…

2