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.

http://pastebin.com/embed_js.php?i=3Ze9ZsG5

2 thoughts on “Using URLRewrite to curcumvent limitation of anonymous WebDAV in IIS7

  1. Remember to add “HTTP_Authorization” variable in the allowed server variables.

    Open “URL Rewrite” – right pane: “View server Variables..” and add one.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s