Thursday, February 25, 2010

Blocking user agents in IIS7

I had a problem with a very specific User-Agent - GBPlugin from Brazil.

Not sure why but this User-Agent was blocking IIS7 (not my ASP.Net app but IIS7 itself :/)

To solve this, I tried blocking GBPlugin a few ways - URLScan, RequestFiltering and my own custom http module. However, eventually I worked out how to do it using the generic URL rewrite module:

Although I of course configured this using the IIS UI not going direct to the .config files - just felt safer on the live server.

1 comment:

  1. I think that you should check the dlk, because sometime we have an error in this section, when the user blocks we have to do a lot of things to resolve.
    Caverta Silagra