Thursday, July 10, 2008

How To Map A HTTPS-only Web Folder To A Drive

Question: In Windows XP/2003, how to map a web folder which allows for only HTTPS connections to a drive?

Windows web folder is Microsoft's implementation of WebDAV (Web Distributed Authoring and Versioning). Two WebDAV clients: Web Folders and WebDAV Mini Redirector are integrated and preinstalled with Windows. Based on them, there are usually 2 methods to access a web folder in Windows:

1) Use 'Add Network Place' in 'My Network Places',

This always works regardless of the connection type (HTTP or HTTPS). However, you can't map a web folder opened this way to a drive.

2) Use 'net use' at command line, as shown below:
net use x: http://domain-name/path-to-web-folder

The web folder is mapped to a drive, but this method only works for HTTP connection because of the limitations of WebDAV Mini Redirector:
  • No support for HTTPS, i.e. no support for secure connections, unless you are using Vista as a client.

  • No support for declared ports (http://myserver.com:8080/dav/) i.e. your WebDAV server must be using port 80, the default port.

  • No support for LOCK and UNLOCK commands, i.e. no locking if, for example, two users try to access (open) the same Word document.

Therefore, if a web folder supports only HTTPS connections, and you issue command:

net use x: https://domain-name/path-to-web-folder

you are given an error message something like 'Sysytem error 67 has occurred. The network name cannot be found.'

A software called WebDrive does feature a function mapping a HTTPS web folder to a drive, but it is not free, unfortunately.

Good news is we can do it free, with the help of stunnel - a universal SSL wrapper.

Stunnel is a program that allows you to encrypt arbitrary TCP connections inside SSL available on both Unix and Windows. And it is licensed under GPL. We use it here as a proxy that encrypts a HTTP request to a HTTPS one and submits to WebDAV server. The details are below:

1) Download stunnel Win32 binary from here and install it. The latest release is 4.25.

2) Edit stunnel.conf that is located at 'c:\program Files\stunnel\', make the following changes:

client=yes

verify=0

and add the following section to the end of the file:

[psuedo-https]

accept = 80

connect = domain-name:443

TIMEOUTclose = 0

The 'domain-name' above refers to the WebDAV server's domain name or IP address. Save the changes and start stunnel, now you should be able to map the HTTPS web folder to a drive by issuing command:


net use x: http://localhost/path-to-web-folder
Note:

  • This solution has been tested to work on Windows XP Pro SP3 and Windows 2003 EE SP2.
  • Please make sure WebClient service is on, and 'Networking Services' component has been installed with your Windows, otherwise you can't use 'net use' command to connect web folder.
  • If the WebDAV server requires Windows AD authentication, ie you must provide a user id in format of 'domain\user' and password so as to connect, you must logon to the domain first. My attempt to map a drive while logging on as a local user has failed, even I have forced stunnel to launch using a valid domain user id. The reason is not known yet.

Reference:

46 comments:

Anonymous said...

my directory tags got eaten in the last post I will try to escape them this time:


In total:

DocumentRoot /web/davdir
\
DirectorySlash Off
Dav on
...
\
alias /davdir /web/davdir

Anonymous said...

grr.. ok enter the angle brackets yourself around the directory tags

In total (minus the brackets):

DocumentRoot /web/davdir
Directory /web/davdir
DirectorySlash Off
Dav on
...
/Directory
alias /davdir /web/davdir

Anonymous said...

having trouble getting the whole explanation of above post to accept, in parts then:

To get this to work (avoid system error 67) with apache 2.2, after watching some debug logs,I had to had to address 2 issues in the apache
conf.

1) The directory or its alias or both should be defined without the trailing slash. This is required even to connect without ssl and tunneling. It does not matter if the slash is included in the net use command or not, the minirederector (net use) always asks for the URL with no slash. In some cases a browser seems to get past this, but I haven't fully understood it.

part 2 in next post..

Anonymous said...

part 2:

2) Add:
DirectorySlash Off
to the directory section.

The issue here is related to the fact that addresses without a trailing slash are not considered "canonical" urls and are redirected by default to the address with the slash. I believe, with UseCanonicalName Off (which I have) this should still redirect to a 127.0.0.1:80 address but I'm not sure. Anyway The browser follows the redirect somehow, but the mini-redirector (net use) does not and fails. The DirectorySlash off command disables the redirect and delivers the goods immediately. A small side effect is that if you have /davdir/index.html, entering 127.0.0.1/davdir with no slash, will give a directory listing but for a webdav mount we probably don't care about this "security" issue. There may be other combinations of settings that get around this, and I'm not an apache expert, so they might even be more reasonable, but this worked for me.

part 3 is the example 2 posts up.

Anonymous said...

part 3:

here is the example again, but without the brackets around the directory tags, because I can't manage to post them:


DocumentRoot /web/davdir
Directory /web/davdir
DirectorySlash Off
Dav on
...
/Directory
alias /davdir /web/davdir

Anonymous said...

I used to be able to find good info from your content.
Also visit my web blog - teenporn

Anonymous said...

I'm curious to find out what blog system you're utilizing?
I'm experiencing some small security problems with my latest blog and I would like to find something more risk-free. Do you have any solutions?
Also see my web page: teen porn

Anonymous said...

Hello, Neat post. There's a problem with your website in internet explorer, might check this? IE still is the market chief and a good part of other folks will leave out your wonderful writing due to this problem.
my page > teen porn

Anonymous said...

It's awesome in support of me to have a web site, which is good for my experience. thanks admin
Also see my page :: nude teens

Anonymous said...

hey there and thank you for your information –
I've certainly picked up something new from right here. I did however expertise several technical points using this website, as I experienced to reload the web site many times previous to I could get it to load properly. I had been wondering if your hosting is OK? Not that I'm complaining, but sluggish loading instances times
will very frequently affect your placement in google and can damage your high
quality score if advertising and marketing with
Adwords. Anyway I'm adding this RSS to my e-mail and could look out for much more of your respective exciting content. Ensure that you update this again soon.
My website :: Free Porn

Anonymous said...

Wonderful beat ! I would like to apprentice whilst you amend your site, how could i subscribe for a weblog web site?
The account helped me a appropriate deal. I have been tiny bit acquainted of this your broadcast provided bright clear idea
Check out my weblog - naked teens

Anonymous said...

Wonderful beat ! I would like to apprentice whilst you amend your site, how could
i subscribe for a weblog web site? The account helped me a appropriate deal.
I have been tiny bit acquainted of this your
broadcast provided bright clear idea
my website > naked teens

Anonymous said...

Yes! Finally someone writes about porn.
Also visit my web page :: teen porn

Anonymous said...


There is definately a lot to find out about this issue. I like all of the points you've made.

Anonymous said...

Link exchаnge is nothing elѕe eхcept іt iѕ just plaсіng the οthег ρerson's website link on your page at suitable place and other person will also do same in support of you.
Also visit my website ... payday loans online

Anonymous said...

Ι pay a vіsit еνeryday a fеw blοgs anԁ sitеs to read content, eхcept this wеbpage οffers fеаture basеd сοntent.
Also visit my website Loans for Bad Credit

Anonymous said...

jura ebook torrent http://audiobookscollection.co.uk/de/2004-Satellite-Activities-Lisbon-Portugal-October-11-15-2004-Revised-Selected-Papers-Lecture-Programming-and-Software-Engineering/p209881/ automated ebook delivery [url=http://audiobookscollection.co.uk/fr/Smart-Couples-Finish-Rich-9-Steps-to-Creating-a-Rich-Future-for-You-and-Your-Partner/p22077/]ebook edward bernays propaganda[/url] suzuki sp370 ebook specifications

Anonymous said...

html ebook website http://audiobookscollection.co.uk/Machine-Learning/c2913/?page=4 walden two ebook [url=http://audiobookscollection.co.uk/Hans-Paul-Schwefel/m47946/]download crsi ebook[/url] foreclosure fortunes ebook

Anonymous said...

sabiston textbook of surgery ebook http://audiobookscollection.co.uk/de/Practical-Sensory-Programmes-For-Students-With-Autism-Spectrum-Disorders/p227288/ ebook viewer for ipaq [url=http://audiobookscollection.co.uk/Crop-Science/c1683/]spliffs ebook free[/url] ebook reading devices mt6225

Anonymous said...

bilingual software http://buyoem.co.uk/product-10387/Speed-Up-My-PC-3-5 pacioli software [url=http://buyoem.co.uk/product-10387/Speed-Up-My-PC-3-5]seru software[/url] what is custom software development
[url=http://buyoem.co.uk/product-33397/Adobe-Photoshop-CS5-Extended-MAC]Adobe Photoshop CS5 Extended MAC - Download OEM, Software Sale, OEM Software[/url] winmagic delete uninstall securedoc software
[url=http://buyoem.co.uk/product-36644/Acropano-Photo-Stitcher-2-1][img]http://buyoem.co.uk/image/8.gif[/img][/url]

Anonymous said...

ωhoah this weblog iѕ great i love reading
yοuг posts. Κeep up the good wοrk!
Үou alreadу knoω, а lοt of people aгe
looking around for thіs informаtion, you can аid them grеatlу.


Herе is my web ρage: instant loans
My web site - instant loans

Anonymous said...

Appreciate thе recommendation. Will try it οut.



Feel free to surf to my web-sіte ... weight loss
My site > weight loss

Anonymous said...

parent internet software http://buyoemsoftware.co.uk/it/product-36306/CDMenuPro-6-4-Business-Edition-Bilingual what software works with powerfile [url=http://buyoemsoftware.co.uk/fr/product-35532/Chronos-iScrapBox-1-1-MacOSX]dudebox software for dell dj[/url] operating and captial budgeting software
[url=http://buyoemsoftware.co.uk/product-35811/FinePrint-6-2-Server-Edition]FinePrint 6.2 Server Edition - Software Store[/url] osha applicable to software company
[url=http://buyoemsoftware.co.uk/de/product-33469/DigitalAnarchy-ToonIt-2-51-for-Photoshop-CS3-x64][img]http://buyoem.co.uk/image/4.gif[/img][/url]

Anonymous said...

genealogy software family tree programs http://buysoftwareonline.co.uk/fr/product-19381/QuickVoice-Mac best document imaging software [url=http://buysoftwareonline.co.uk/product-10281/Pointdev-Ideal-Migration-4-2]overburning software[/url] accounting tax software
[url=http://buysoftwareonline.co.uk/it/category-11/Strumenti-di-sistema]Strumenti di sistema - Software Store[/url] merge pictures free software
[url=http://buysoftwareonline.co.uk/it/product-36593/Microsoft-Windows-7-Home-Premium-x32-French][img]http://buyoem.co.uk/image/2.gif[/img][/url]

Anonymous said...

[url=http://redbrickstore.co.uk/products/norvasc.htm][img]http://onlinemedistore.com/9.jpg[/img][/url]
virginia pharmacy license http://redbrickstore.co.uk/catalogue/r.htm nelson pharmacy [url=http://redbrickstore.co.uk/products/vigora.htm]four corners pharmacy[/url]
pharmacy jacket http://redbrickstore.co.uk/products/rave--energy-and-mind-stimulator-.htm savon pharmacy delaware [url=http://redbrickstore.co.uk/products/casodex.htm]casodex[/url]
dextromethorphan hydrobromide pharmacy http://redbrickstore.co.uk/products/cefixime.htm herb pharmacy adrenal support tonic [url=http://redbrickstore.co.uk/products/periactin.htm]harrisburg hometown pharmacy[/url]
zocor online pharmacy http://redbrickstore.co.uk/categories/women-s-health.htm pharmacy by mail charlestown [url=http://redbrickstore.co.uk/products/levothroid.htm]levothroid[/url]

Anonymous said...

Do you mind if I quote a couρle of your
articles as long as Ι provide credіt аnd sources
back to your webpagе? Mу websitе is in the exaсt sаme nіche as youгs anԁ my visitοгs would truly benefіt fгom а lot
of the іnfоrmаtiоn you prеsent here.
Рlease let me knoω іf this oκay with you.

Apprеcіаte it!

Viѕit mу blοg - quick loans

Anonymous said...

Nice post. I learn something new and challenging on websites
I stumbleupon on a daily basis. It will always be exciting to read through articles from other authors and
use something from their web sites.

Also visit my blog tour packages in thailand

Anonymous said...

It's actually a cool and helpful piece of info. I'm glad that you shared this helpful information
with us. Please keep us informed like this. Thank you for sharing.


My blog post - movie torrent download

Anonymous said...

It's enormous that you are getting ideas from this article as well as from our dialogue made here.

Also visit my web blog; payday loans

Anonymous said...

Great post.

Feel free tо surf tο my web-ѕіte - hcg food list

Anonymous said...

I think this is among the most important information
for me. And i'm glad reading your article. But wanna remark on few general things, The web site style is great, the articles is really excellent : D. Good job, cheers

Feel free to surf to my homepage; Christian Louboutin Pumps

Anonymous said...

Wow, this article is good, my sister is analyzing these things, so
I am going to let know her.

Feel free to surf to my web site: cheap ralph lauren

Anonymous said...

I don't know whether it's just me or if everyone else experiencing problems with your website.

It appears like some of the text within your content
are running off the screen. Can someone else please comment and
let me know if this is happening to them as well?
This may be a problem with my web browser because
I've had this happen before. Many thanks

Check out my homepage; polo ralph lauren sale

Anonymous said...

Thanks a lot for sharing this with all of us you really recognise
what you are talking approximately! Bookmarked.
Kindly additionally seek advice from my site =). We
could have a hyperlink alternate contract among us

my web-site :: pirater Un Compte facebook

Anonymous said...

Its such as you learn my thoughts! You appear to understand so much about this,
like you wrote the e-book in it or something. I feel that you can do with
a few % to power the message house a bit, however instead of that,
this is magnificent blog. An excellent read.

I will certainly be back.

Also visit my blog - christian louboutin bianca

Anonymous said...

longchamp soldes "Fashion's Night Out," has since turned into a global night of retail revelry in 19 countries, according to organizers, as store stay open late and offer drinks, entertainment and free products to the throngs. vuittonbagssale.webnode.jp

Anonymous said...

free russian dating sites http://loveepicentre.com/advice/ hockey player dating lady gaga
dating reject number [url=http://loveepicentre.com]dating a much younger men[/url] match making free adult dating site
the first online dating [url=http://loveepicentre.com/contact/]dating corpus christi[/url] evolution radiometric dating fossils [url=http://loveepicentre.com/user/natureboyz/]natureboyz[/url] las cruces dating

Anonymous said...

dating zone http://loveepicentre.com/faq/ arab matrimonial dating
russian women dating service [url=http://loveepicentre.com/contact/]speed dating north west london[/url] dating insecurities
local adult sex and dating websites [url=http://loveepicentre.com/success_stories/]who is elizabeth moss dating[/url] bullock never wanted aniston dating proposal [url=http://loveepicentre.com/user/ahmed/]ahmed[/url] top ten latest dating site

Anonymous said...

Do you have any video of that? I'd like to find out some additional information.

my page: Generateur de Code PSN

Anonymous said...

Hey there would you mind sharing which blog
platform you're working with? I'm looking to start my own blog
soon but I'm having a hard time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I'm looking for
something completely unique. P.S Apologies for getting
off-topic but I had to ask!

Also visit my web-site - ジョーダン

Anonymous said...

For hottest news you have to go to see world-wide-web and on the web
I found this website as a best website for latest updates.



Look into my blog post ... Cheap Ray Bans

Anonymous said...

I am regular reader, how are you everybody? This article posted at this website is genuinely nice.


my webpage - Dragon City Cheat Engine

Anonymous said...

Definitely believe that which you said. Your favorite justification appeared to be on the
net the easiest thing to be aware of. I say to you, I definitely get irked while
people think about worries that they just don't know about. You managed to hit the nail upon the top and defined out the whole thing without having side effect , people can take a signal. Will likely be back to get more. Thanks

Feel free to surf to my weblog: www.jakesporn.com (http://www.tube8.su)

Anonymous said...

There's definately a lot to learn about this issue. I really like all the points you have made.

Also visit my webpage ... solar teich

Anonymous said...

Hello there, just became alert to your blog through Google, and found that
it's truly informative. I'm gonna watch out for brussels.
I will be grateful if you continue this in
future. A lot of people will be benefited from
your writing. Cheers!

Visit my page; Michael Kors

Anonymous said...

Howdy fantastic blog! Does running a blog such as this take a lot of work?
I have no expertise in programming however I had been hoping to start my own blog soon.
Anyway, if you have any suggestions or tips for new blog owners please
share. I know this is off topic however I simply wanted to
ask. Cheers!

My site; Cheap Oakleys