WebDAV on Windows 7

WebDAV is a great way of accessing files over the Internet.  It’s essentially FTP, but not so archaic and fragile.  It works well through firewalls, can be encrypted, and is just generally a nice, modern, useful protocol.

I’ll show you a couple WebDAV tricks in a moment, but first, I’m going to show you how to set up WebDAV on your own Windows machine.  It’s one of the best ways of accessing files remotely – free, easy, and highly compatible.  I’ll assume you’re using Windows 7, because if you’re a tech enthusiast, there’s no reason you should be using anything else at this point.  WebDAV works under pretty much everywhere, but it’s not always this easy to set up.

So, the first thing to do is to install IIS, if you haven’t already done so.  IIS is included in all versions of Windows 7, although it’s not turned on by default.  Click Start, type “Windows features”, and click enter.  This will get you to the Windows Features dialog (which you can also access through Add/Remove Programs):

image

Turn on IIS, and make sure you select at least the following:

  • Internet Information Services
  • IIS Management Console
  • WebDAV Publishing
  • Windows Authentication

You might want to read through everything else there and make your own decisions about what you’d like to install.  If you don’t know what something is, just leave it off – it’s easy to change later.  Then, you’ll need to open port 80 on your router and firewall (assuming you want to access this server from elsewhere on the Internet).

Now, start IIS Manager.  You’ll need to configure authentication, so select Default Web Site and double-click the Authentication icon:

image

Depending on what options you chose earlier, you might have other types of authentication available here (such as basic, Kerberos, or certificate-based). I’d suggest you disable Anonymous and enable Windows authentication.

Next, go to WebDAV Authoring Rules, and click Enable on the right:

image

This turns on WebDAV for this web.  Now, you’ll need to add an authoring rule (essentially, permissions for WebDAV).  Click ‘Add Authoring Rule’ from the right, and you’ll see this:

image

The easiest thing to do here is to select all content, all users, and all permissions.  Clearly, you may want to change this to suit your requirements.

Once you click OK, your server will be running WebDAV!  This is great if you just want access to the files on your Default web site, but if you want general access to other places on your computer, you’ll want to add some virtual directories.  To do this, right-click the Default Web Site, and choose ‘Add New Virtual Directory’:

image

Type an alias and provide a path to the folder you’d like to share.  Then click OK.  Just like that, you’ve set up a ‘Share’ under WebDAV.

Now, I’ll show you a great trick for using WebDAV.  This will also let us test to see if everything is working properly.  Open a command prompt, and type something like this:

net use * http://mobile1/projects

That should map a network drive to your WebDAV folder:

image

As you can see, it’s a pretty easy way of accessing your files remotely.  You get all the rich tools of working with files straight through Windows, and since WebDAV works over simple HTTP, this will work through all but the strictest of firewalls.  As this is running through IIS, you can also take full advantage of the rich security and administration tools IIS provides – including HTTPS, if you’re worried about encrypting your transfers (while your password will be encrypted if you use Windows Authentication, the rest of your session is sent in the clear if you choose to use normal HTTP).

By the way… if you have Directory Browsing turned on, you can type that same URL into a browser, authenticate as required, and you’ll see a listing of your files that you can download directly.  This might not be as slick as WebDAV, but it’s guaranteed to work everywhere.

Here are some things you may run into trouble with:

  • You can’t use Basic authentication with HTTP.  This is a good thing: in such a scenario, your password would be sent in plain text.  Either use HTTPS or turn on Windows Authentication.
  • Don’t forget that IIS runs under an account that won’t have access to certain places (like your desktop) by default, so you may have to adjust file permissions accordingly.
  • To use WebDAV, three permission checks will all have to succeed: the WebDAV authoring rule, your IIS permission settings, and your Windows permission settings.  If you’re having trouble, start at the bottom and work your way up.  Can you access the file through IIS using a browser?  If not, you won’t be able to get at the file through WebDAV, either.

Because of the flexibility offered through IIS, you can use this for much more than simply accessing your documents remotely:

  • Let others edit a web site you’re hosting.
  • Set up a public read only ‘tools’ folder where you can easily get at common tools and documents you find yourself wishing were available on other people’s machines.
  • Create a web-accessible team folder, granting read-only access to some users and full access to others.
  • Publish web pages from within Microsoft Office!  Just choose ‘web page’ as the file type when you click Save, and save the document to a public WebDAV folder.

There’s a tremendous amount of helpful information on WebDAV under IIS 7 at http://learn.iis.net/page.aspx/357/webdav-for-iis-70/ if you want to learn more.

WebDAV: Use it, love it.  It doesn’t get much better than this, folks!

36 comments:

  1. Thank you for a great article. I followed all your steps & setup WebDAV on my Win 7 desktop at home. I installed GoodSync to connect remotely (via Internet) but I am unable to do so. I think the problem might be a simple syntax error & I am hoping you can help me.

    For example, if:

    IP = 50.50.50.50
    Computer name = COMP
    WebDAV virtual folder = test (local user has full access)
    username = user
    password = password

    What would the syntax be for me to connect. I have tried various combinations but so far no dice. Also, in your article you mention forwarding port 80 to the local pc (which I have done), but other WebDAV articles mention port 443. Am I supposed to use 443 & not 80?

    Here is a screenshot of the error I see when I attempt to connect:

    http://i72.photobucket.com/albums/i181/thanasi67/webdav.jpg

    Thanks again for the great article & I hope to hear your thoughts :)

    Cheers,

    AP

    ReplyDelete
  2. Oh, by the way 50.50.50.50 is not my IP I just used it in my example/screenshot to give you an idea of what I've been trying :)

    ReplyDelete
  3. Hi Arthur,

    Everything looks Ok there, but I cannot glean much information from that error message that you have shown.

    If you try and access it from a browser internally by going to

    http://localhost/test do you get a specific error message or if you do this externally.

    If oyu have chosed windows authentication it might want the username in the form of domain\user

    so if your computer was named comp1 then the user name would be

    comp1\user

    ReplyDelete
  4. By the way, 443 is not necessary as that would be used if you encrypted your webdav traffic using SSL

    You can do that later, but get it working with simple http first ... then worry about the extra steps that would be needed to generate an ssl cert and bind it to your IIS install.

    ReplyDelete
  5. Hi Matt,

    thank you for helping!

    If I try your suggestion & type http://192.168.0.100/test on the computer running the WebDAV server then I do see a listing of all the files in the 'test' folder.

    However, I did try http://192.168.0.100/test from my notebook computer that's on the same home network but it did NOT connect (page not found). It did not even prompt me for a username/password. I don't know if this is normal or not?

    I also disconnected my notebook from my home network & connected to an open wireless network in my building to test "Internet" connectivity. Typing in http://my.external.ip/test does not work. I tried with my username or computername\username like you suggested.

    Man this is so frustrating. Anything I should be checking in the WebDAV settings? I doubled checked your Blog & believe I followed your instructions correctly.

    ReplyDelete
  6. Check the windows firewall. Just turn it right off for testing and see if it works. You should be getting a password prompt.

    Then after you have doen that ensure that the ports on your router are properly forwarded.

    If it is working on your own PC, then something such as a firewall is most likely the culprit.

    ReplyDelete
  7. Matt, what Firewall entry am I looking for, specifically? At the bottom of the Allowed Programs list I see "World Wide Web Services (HTTP)" & there is no checkmark in either of the "Home/Work" or "Public" boxes.

    ReplyDelete
  8. Oops, I accidentally hit Post instead of Preview! Anyway, to continue what I was saying above, should I check one or both of those boxes? Or, are they not related to my connection issues? I don't want to enable anything unless I know exactly what it does!

    Cheers,

    Arthur

    ReplyDelete
  9. I would just completely shut off your firewall for testing purposes.

    Then once you confirm that this is the issue, add those exceptions.

    I am pretty sure that is your problem.

    ReplyDelete
  10. Matt, thank you so much for solving this for me. The GoodSync tech support was the worst I had ever dealt with & were completely indifferent/clueless.

    Bookmarked your Blog!

    Cheers,

    Arthur

    ReplyDelete
  11. Great guide, but still having some problems...

    I can connect and browser the files through a browser but not through a mapped shared in windows. So it seams that the permissions is all right.

    I'm connecting to the webdav through the internet. The computers aren't in the same network. The password prompt appear in both cases.

    I'm connecting to httpS://myip/vshare/

    I'd tired with MyComputerName\MyAccountName as the username.

    I'm using SSL only on port 443.

    When connecting through the local computer http://localhost/vshare/ it mounts fine and I can browser all the files on Z:\.

    Suggestions?

    ReplyDelete
  12. I have gone through all the steps above, when I map to my domain and to the folders, I can see the folders, but when I double-click on them cannot see the files. Worked fine on my XP laptop. Can anyone help me on this, been working on this for 6 weeks now since upgrading to Win7. Thanks, Pam

    ReplyDelete
  13. THANK YOU!!!!!!! This is EXACTLY what I needed to get windows 7 64-bit and iPhone 3Gs working with GoodReader Lite so I can transfer PDFs into a directory structure on my iPhone and read them on the iPhone. I searched for this solution in response to the error message "the folder you entered does not appear to be valid". Not sure why it was needed when I could see my iPhone was listening via good.iware webdav server on port 8080 anyway, but for some reason connecting to the iPhone just didn't work without enabling IIS first. (I have dropped every keyword I can think of in this post so others can find this solution too!)
    Your are a wizard - too brilliant - thanks!!!

    ReplyDelete
  14. HI There,

    I setup WEBDAV for publishing calendars, when try to publish I am asked for my user name and password which I enter but it is not acceppted, I am using windows authentication, any ideas what I have missed?

    ReplyDelete
  15. Are you Using your username with domain prvided ?
    Ex. Username = nils Domain= work
    Login username shall then be workgroup\username
    Ex. work\nils

    ReplyDelete
  16. I have tried and failed many times with this. I could browse http://server/files by using the "server" name from the server itself. I then tried a FQDN from external http://server.domain.com/files with no luck. I then found the problem in my IIS bindings. I added server.domain.com into my bindings for that IP address. Voila! Thanks everyone, this is a great tutorial.

    ReplyDelete
  17. I found that i needed to set the port up in windows firewall in order to get this to work.
    Steps to set this up;

    click start->search for "windows firewall with advanced security". New policy can be setup by selecting "inbound rules" on the left hand side, then "new rule" from the right toolbar.Select port, click next, select tcp, and select "specific ports". Enter the port you are using ( default 80 for http and 443 for http), click next. select "allow the connection", click next. un-tick "Public", unless you want to view it outside of your home network. Click next, give it a name, and it should work.

    ReplyDelete
  18. I tried the instructions as listed and then come to find out that windows authentication is not supported in any of the Windows 7 home editions, only versions above home. DOH!! To bad Microshaft keeps doing this to home users who could still benefit from the use of the full technologies that that overcharge for. Thank goodness for Linux!!!

    ReplyDelete
  19. Thank you for your excellent article. I tried it and it worked perfectly.

    ReplyDelete
  20. I have a problem...or maybe more the one, I tried setting up a webdav folder, selected the folder, shared it, now
    WHAT I CAN DO is: entering in web browser at the address: 192.168.1.3/music where the ip is the ip i have in lan, and the /music is my chosen folder.

    WHAT I CANT DO is: accessing to the folder from external ip, neither from my personal dyndns address, since its practically the same i guess...so can someone help me accesing my folder from external? i have fowarded ports 80, 443 in the router, and tried without firewall but the error i get after trying to log in is:

    Error 342 (net::ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS): Unknown error.

    ReplyDelete
  21. I am having a real tough time trying to get the most basic functionality from the Windows 7 web pages and what is particularly upsetting is that this article seemed to hold the solution - but I'm nowhere despite following everything to a "t" and literally hours of work.

    I am trying to simply post via web pages (WebDAV) to my comcast home page. In XP, it was as simple as creating a web folder and pointing it to ftp://username@upload.comcast.net. Web Foolders and Windows 7 is a complete turkey in that regard, and ISS has proven completely unreliable in getting that basic functionality. I have tried every variation I can think of in addresses and even in trying to set parameters in ISS itself (and - yes - I even disabled my firewall), yet no matter what I put in for a network place I get the dreaded "The folder you entered does not appear to be valid". Can anyone give me another clue?

    Lee

    ReplyDelete
  22. So, excellent article but still a lot of problem on my windows 7 Home Premium.
    I can access easyly and see the folders from anywhere in Internet and also in My personal Lan, but not through a mapped shared in windows.
    i think some usual wickness in the Windows side properties, and in this case in the passwords autenthication.

    in short: I can access my web dir from Internet
    i cannot access from my computer through a mapped shared in windows.

    in both cases the system ask for user and pwd but only the first grant me the access.

    does anybody have the same problem?
    Thanks a lot.

    ReplyDelete
  23. Thanks. But don't forget that large files (>30MB) won't upload with the default settings. I've successfully resolved this problem by changing the default-maxfilesize-entry in IIS.
    ( in the web.config file).
    In the days of scanned pdfs and videos, 30MB seems to be a silly default setting on Microsoft's side, but there you go.

    ReplyDelete
  24. Hello,

    Thank you very much for the great tutorial. I have a Windows 7 x64 Ultimate at home and am trying to setup a secure WebDAV connection to my work PC, also running Windows 7 x64 Ultimate. Following your instructions, I was able to get WebDAV to work without SLL (regular HTTP).

    However, when I try to connect via secure WebDAV (HTTPS), I have to enter my username/password twice, and then I get an error stating that the folder was not valid. This has been driving me nuts for the last couple of hours.

    Has anyone been able to successfully carry this off with SSL under Windows 7 x64 Ultimate? Thank you for any help.

    Regards,
    Paul

    ReplyDelete
  25. Hi,

    I have done all steps that you have described but whenever I type(net use * http://machine name/foldername) in command prompt then it giving error as follows,
    Machine error 67 has occured, the network name can not be found.

    Please help me
    Regards
    Pravin

    ReplyDelete
  26. Read this page.
    http://www.techiechips.com/web-folders-web-disk-webdav-problems-on-windows-7/

    It seems Win7 still has an issue with WevDAV.
    Was fixed in Vista but re-emerges in Win7.

    ReplyDelete
  27. Great Guide Thanks but I am having a problem.

    I am able to access my virtual directory via web browser on my home network http://192.168.1.xxx/Stuff and also over the internet http://myhomeip/Stuff but when I try to create the Network Place in Windows xp or map the share using (net use * http://localhost/Stuff) it will ask me for my user name and password but then I get "System error 67 has occurred. The network name cannot be found." Does anyone have any idea what I am doing wrong?

    ReplyDelete
  28. Hi. Great article. it was extremely helpful. I am able to access my website via http://localhost/Backup. I am able to download files. However, when I try to access the WebDav via GoodSync and the iPhone app, "Pages," I get some error messages.

    I can successfully log in and see the "Backup folder." However, when I try to open it, I get the following error messages. In Good Sync it says "Bad request 400." In Pages it says "An error occurred. Please try again."

    I have the file permissions set so that it can be read, written, etc. I have also disabled my firewall on all computers involved. I am using a home network with all involved computers connected on them.

    Please let me know. If you could email me at BrianPCleaver(at)Gmail(d.o.t)com that will be great. Thanks!

    ReplyDelete
  29. I also am unable to Map my network drive. When I try to map my network drive, I enter "user: (localhost)\username, Password: (password)" I then get the login window popup again. Any ideas?

    ReplyDelete
  30. I also am able to login and access my http://localhost/folder via another computer. However, if I connect using WebDav, I cannot log in and it comes up invalid. ANy ideas?

    ReplyDelete
  31. After creating the virtual directory, I try to do a "test connection."

    I get the following error message.

    he server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that \$ has Read access to the physical path. Then test these settings again.

    ReplyDelete
  32. It turned out that my problem was that I was connected to an external hard drive. I have to use drive C:\. Problem solved. :-/

    ReplyDelete
  33. I too was trying to get goodreader and windows 7 playing nice. Thanks for posting this! I had two additional problems - you must turn on Directory Browsing in IIS for the virtual directory AND you must have the mime type available in IIS. In my case, I was trasferring mp4. So, click mime types, add a mime type ".mp4" "application/octet-stream." Using the http://localhost/virtualdir gave me additional information that helped solve my problems. Good luck everyone else!

    ReplyDelete
  34. I cant find the Windows Uuthentication box under the Windows Features - I have found all the rest but I keep on coming up with an error when I hit the OK button - "An error has occurred. Not all the features were successfully changed."

    ReplyDelete
  35. Superb blog , it’s a really informative blog for all user who can facing windows 7 problem, Our services provide complete solution of your windows 7 realted problem.please go through this link .
    windows firewall error 1068 windows 7
    Thank you
    Aalia lyon

    ReplyDelete
  36. We can get instant solution of windows 7 problem, just call us help desk number. This is so informative for you .just go through this url.
    Fix Windows 7 Error 1068
    Thank you
    Aalia lyon

    ReplyDelete


Copyright © 2010 Paul Guenette and Matthew Sleno.