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

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

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

Faster proxy detection for HttpWebRequest

Do a web request using System.Net classes, HttpWebRequest or WebClient. For example: new WebClient().DownloadFile("http://tinyurl.com/d5yy8a", @"C:\Temp\file.xml"); Or: HttpWebRequest.Create("http://tinyurl.com/d5yy8a").GetResponse(); If the first request takes more than 4 seconds and you think is too much time for your application, then the following information may interest you. The reason the first request takes more time is because it tries, by…

2

How to consume ETW events from C#

In my previous post I explained how to collect ETW events from URL Rewrite (or any other IIS provider) and then display those structured events in the Event Viewer. Now I want to show you how to collect ETW events using C#. The .NET Framework 3.5 provides a new namespace System.Diagnostics.Eventing.Reader where you can find…

16

How to display URL Rewrite ETW Events in the Event Viewer

IIS Failed Request Tracing is a powerful way to troubleshoot Web Requests, it provides an easy way to track each execution step for one specific request. URL Rewrite Module provides several events that can be tracked using Failed Request Tracing, here is an article that explains how: http://learn.iis.net/page.aspx/467/using-failed-request-tracing-to-trace-rewrite-rules/ IIS Modules have the ability to publish…

4

Write your own UI Rewrite Template Extension!

The GoLive release of URL Rewrite Module is now available and has a lot of improvement thanks to the IIS Community feedback (and tons of internal brainstorm meetings!). A new feature is the ability to create Rewrite Rules by using Rewrite Templates, Rewrite Templates are UI extensions that help to simplify the creation of rules….

4

URL Rewrite for IIS 7.0 / Regular Expressions and Wildcards

Last week we shipped the first preview of URL Rewrite Module for IIS 7.0. If you are not familiar with URL Rewriting engines, please check out the walkthroughs:  http://learn.iis.net/page.aspx/460/using-url-rewrite-module/. If you are you familiar with mod_rewrite, I’m pleased to let you know that we have a mod_rewrite rule importer feature to help you to leverage…

4