Thursday, February 09, 2012

Using URLRewrite to curcumvent limitation of anonymous WebDAV in IIS7

IIS7 removed possibility to use anonymous WebDAV and one of the solution proposed to curcumvent this (Here) was using custom HTTP Module which would inject Basic Authorization header into the stream.

This works but pretty difficult to implement. First you have to compile assembly, secondly you have to hardcode username and password into DLL without possibility of changing it once deployed. There are some drawbacks to that solution as well since that module is being executed on every incoming request regardless wether it's WebDAV or not.
Instead of that you can just simple use URLRewrite module to do exactly the thing mentioned with no additional complexities mentioned. You need to create rewrite configuration below. You encode desired username password using base64 encoding (for example here Here) in format "username:password" and append that value after "Basic" value below.


Post a Comment