Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Extendng on my question at Is it possible to write a regular expression that catches a match that others have missed in IIS? I would like to know if I can have the rewrite rules write to a file. For example if the file test.aspx is not found and rather than redirecting the user, it gets logged into a file.

share|improve this question
up vote 1 down vote accepted

IIS URl Rewrite can load custom providers so it's possible to do this using your own provider. For more information see:

Developing a Custom Rewrite Provider for URL Rewrite Module

Using Custom Rewrite Providers with URL Rewrite Module

Although it might be easier to trawl the IIS logs for 404 errors or have a customer 404 page to do this for you.

share|improve this answer
Thanks Kev. So there is no way to do it without the Providers? The reason being is that we are on a shared hosting environment and I highly doubt they will install the providers for us. – PeanutsMonkey Jul 12 '11 at 23:38
@peanuts - there's no built in mechanism to write to file "out of the box". However you shouldn't need your hoster to install the providers. Just drop them in your /bin folder and reference them in the web.config file as described in the articles. – Kev Jul 12 '11 at 23:40
Which files do I need to include in the /bin folder? – PeanutsMonkey Jul 13 '11 at 1:19
You have to write the provider yourself then deploy the compiled binaries into the /bin folder of your website. – Kev Jul 13 '11 at 1:26
Ah, according to the articles I could do them via IIS hence my assumption I could copy across the Provider assemblies into the bin folder and reference them from there. Unfortunately I am not a .NET developer. Is there any other way? – PeanutsMonkey Jul 13 '11 at 1:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.