SabreDAV on Win7 IIS7.5

650 views
Skip to first unread message

Jacques

unread,
Nov 11, 2010, 10:40:56 AM11/11/10
to SabreDAV Discussion
Hi,

Just to say thanks for the great project and report that I managed to
get SabreDAV working on Win7 with IIS7.5 with and without URL
rewriting.

And also to ask if there are any samples of using Custom Properties?
TIA

Evert Pot

unread,
Nov 11, 2010, 12:35:49 PM11/11/10
to sabredav...@googlegroups.com
Hi Jacques,

On 2010-11-11, at 4:40 PM, Jacques wrote:

> Hi,
>
> Just to say thanks for the great project and report that I managed to
> get SabreDAV working on Win7 with IIS7.5 with and without URL
> rewriting.

Thanks for letting us know! Were there any special things you needed to do, that would be worthwhile to add to the wiki?

>
> And also to ask if there are any samples of using Custom Properties?

* Nodes in Sabre_DAV_FSExt_* store and return simple dead properties.
* The Authentication nodes also supply some custom read-only information (Sabre_DAV_Auth_Principal)

Are those the types of examples you're looking for?

Evert


Jacques

unread,
Nov 11, 2010, 2:37:00 PM11/11/10
to SabreDAV Discussion

Yes, thanks for the examples, I'm sure I can take it from there.

Re IIS - Yes, took me the better part of an afternoon (since I don't
have any nice WebDAV debugging tools) to figure out that one should
completely uninstall the WebDAV feature from IIS before SabreDAV will
be working. Even though the default WebDAV was already disabled on
the particular test website, it seems IIS "filters" all HTTP DAV
methods out and only leaves the normal GET, PUT, OPTIONS methods for
the websites when WebDAV is installed. Cost me to first make Sabre
work on Lighttp on the same machine to have a working webserver to
have something to compare against. This step may still be a bit
extreme (i.e. may still be a less extreme way to get ALL methods to
come through even though dav is installed), but it is what worked in
the end. Any less extreme tips welcome! Especially since SabreDAV
will most likely have to share IIS in production environments and
can't enforce a complete removal of the standard WebDAV for other
sites.

Also, if you do not want Basic WebClient authentication and want
digest, do not enable it in your registry. Seems windows then refuse
to use anything else but basic.

The URL rewriter in IIS 7.5 is not installed by default, but can be
downloaded from Microsoft and is really powerful and available for
both 32 and 64bit editions. Great tutorial here:
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/

And last but not least, SabreDAV requires the $_SERVER['REQUEST_URI']
which is not set by IIS, so I fixed that with the following code
before any Sabre code is loaded:

// If using IIS Rewriter then this is set
if (isset($_SERVER['HTTP_X_ORIGINAL_URL']))
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
// Else build our own
if (!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = '/'.substr($_SERVER['PHP_SELF'],1 );
if (isset($_SERVER['QUERY_STRING'])&&$_SERVER['QUERY_STRING']!
='') {
$_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'].='?'.
$_SERVER['QUERY_STRING'];
}
}


Any tips on how you do your DAV debugging would also be welcome? I'm
sure I'll need it sooner rather than later, especially when adding new
properties, trying to save cookies, sessions, etc. I do not see any
easy way to enable some sort of debug logging in Sabre (besides
logging the source line numbers in exceptions).

Thomas Parvais

unread,
Jun 14, 2013, 11:14:01 AM6/14/13
to sabredav...@googlegroups.com
Hello Jacques

Could you give me more details about how to create a rewriting rule on iis7.5 for SabreDav ??

I've already installed this feature, but I don't know how to configure it for SabreDav.

Can you help me ?

Thank you
Reply all
Reply to author
Forward
0 new messages