Cloud Zone is brought to you in partnership with:

Brian Lewis works as an IT Pro Evangelist for Microsoft Corporation in the Midwest, where he focuses on the IT Pro audience in Illinois, Indiana, and Wisconsin. He is very passionate about technology and has over 18 years of enterprise IT experience. Brian enjoys working with all computer and networking technologies. He enjoys everything from programming and scripting to working with all types of infrastructure. There just isn’t a technology that isn’t interesting to him. Brian enjoys several hobbies outside of computers including rock climbing, trail biking, and swimming. http://mythoughtsonit.com Brian is a DZone MVB and is not an employee of DZone and has posted 13 posts at DZone. You can read more from them at their website. View Full User Profile

Deploy a File Server in the Cloud (WebDav on Windows Azure)

05.15.2013
| 3036 views |
  • submit to reddit

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:
http://mythoughtsonit.com/2013/05/20-key-scenarios-with-windows-azure-infrastructure-services/

windowsazure497e851aa948Web-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:
http://mythoughtsonit.com/2013/04/step-by-step-guide-to-setting-up-a-windows-azure-free-trial/

Second Provision a Server 2012 machine. Watch a video of what to do here:

Third open port 80 to this new server:

  1. In the Azure Portal select your 2012 server and choose the “ENDPOINTS” tab on the top.
    image
  2. Click “ADD ENDPOINT” at the bottom of the screen
    image
  3. Enter the ENDPOINT information for port 80 to port 80
  4. Done.

Next we need to install the IIS Webserver and WebDAV.

Installing WebDAV on IIS 8.0

  1. Start Server Manager and go to “Add Roles and Features”
  2. Under Server Roles – add the Web Server (IIS) Role
    image
    image
  3. Click through the wizard until you come to the Role Services section. Then find and select “WebDAV Publishing” and “Windows Authentication”
    image

    image

  4. Click Next and then Install
    image
  5. When the Install is finished you are ready to move on to the next section.
    image

Configuring IIS 8 for WebDAV

  1. 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”

    image

  2. Open the Windows Authentication option and enable it.

    image

  3. Open the “WebDAV Authoring Rules”

    image

  4. 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. Winking smile

    image

  5. Make sure WebDAV is enabled and that your access rule is set:
    image
  6. 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/

    image

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:

  1. From Windows Explorer, right click on “Computer” and select “Map a network drive”

    image

  2. Map your network drive by entering the address to your server
    Example:http://YourDomainName.cloudapp.net/
    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.

    image

  3. Hit “Finish” and enter your credentials. 
    image
  4. Now you will have a connected drive that you can access from Windows Explorer or any tool via the drive mapping.
    image

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/

Published at DZone with permission of Brian Lewis, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)