This month, my fellow IT Pro Technical Evangelists and I are authoring a new series of articles on 20 Key Scenarios with Windows Azure Infrastructure Services. Check out the list of articles here:
Web-based Distributed Authoring and Versioning, or WebDAV, is a set of protocols based on HTTP that allows end-users to map a network drive over http and edit content and files stored on the web server. When WebDAV was first offered on Microsoft server I had evaluated it and decided it did not perform well enough for me. The WebDAV extension to IIS was completely rewritten back in the Server 2008 timeframe and is worth taking a look at again.
In this article I will guide you step by step through the process of setting up WebDAV on Server 2012 in a Windows Azure IaaS environment. This will give you a solid performing file share on the internet over port 80 and the http protocol.
First you need an Azure Account. You can setup a free trail of Azure. Details can be found here:
Second Provision a Server 2012 machine. Watch a video of what to do here:
Third open port 80 to this new server:
- In the Azure Portal select your 2012 server and choose the “ENDPOINTS” tab on the top.
- Click “ADD ENDPOINT” at the bottom of the screen
- Enter the ENDPOINT information for port 80 to port 80
Next we need to install the IIS Webserver and WebDAV.
Installing WebDAV on IIS 8.0
- Start Server Manager and go to “Add Roles and Features”
- Under Server Roles – add the Web Server (IIS) Role
- Click through the wizard until you come to the Role Services section. Then find and select “WebDAV Publishing” and “Windows Authentication”
- Click Next and then Install
- When the Install is finished you are ready to move on to the next section.
Configuring IIS 8 for WebDAV
- After the installation finishes you need to configure the box for access. Start the IIS Manager tool. Choose the “Default Web Site” on the left side. Then click on “Authentication”
- Open the Windows Authentication option and enable it.
- Open the “WebDAV Authoring Rules”
- Create a WebDAV rule. I choose to allow all users access to all content. A better security practice is to limit what users can use the service. It’s your data so you decide.
- Make sure WebDAV is enabled and that your access rule is set:
- That is it… Now your ready to access your WebDAV file share!
Test and insure you can hit the web server by using your browser:
- Because you opened port 80 and installed IIS 8 you should see the default web page when you browse to your servers internet DNS name. Example: http://YourDomainName.cloudapp.net/
How to map a drive to your WebDAV server:
There are two ways I use to connect to the WebDAV server
How to map a drive to your WebDAV server from the Win 8 GUI:
- From Windows Explorer, right click on “Computer” and select “Map a network drive”
- Map your network drive by entering the address to your server
I selected “Connect using different credentials” because my workstation was not joined to the server in anyway and I needed to use an account in the servers local SAM database.
- Hit “Finish” and enter your credentials.
- Now you will have a connected drive that you can access from Windows Explorer or any tool via the drive mapping.
How to map a drive to your WebDAV server from a CMD box:
1. Hit Windows Start and type: CMD <enter>
2. Enter the command: net use [drive letter] [URL] Example: net use E: http://YourDomainName.cloudapp.net/