Data / Storage Hybrid Migration Windows

IIS on Azure NetApp Files

Azure NetApp Files provide seamless network file access to clients and support multiple protocols. Server Message Block (SMB), aka Common Internet File System (CIFS), is one of the major protocols supported by Azure NetApp Files for Windows® file services environments. In Web server deployments, data management is considered a significant part, and storage plays a vital role in serving the data to the server with high reliability and performance. This document explains how Azure NetApp Files fit this requirement and what a typical Web server deployment looks like. 

It also provides some configuration techniques. In addition, this document talks about Web-based file sharing. Using the SMB protocol, the user can access files and folders from the SMB share of the Azure NetApp Files service. Users can map the share to their local system to read, write, and edit/modify the contents of the share if they have the required permission. In Web-based file sharing, the SMB share can export as a virtual directory and publish through the IIS Web server. Users can access the files and folders via browsers, and the contents are read-only.

Network file access and file sharing are among the top priority items when it comes to Azure NetApp Files storage deployment in Windows environments. When a Windows client accesses files from Azure NetApp Files storage, it uses the SMB protocol to talk with. This conventional file access and file sharing method has been employed for ages.

In Web-based file sharing, IIS works as a Web front-end server to host the files that need to be shared across the clients. The files hosted are from the Azure NetApp Files SMB share. Users access the required files via a Web browser using HTTP protocol. On the back end, communication between the IIS server and the Azure NetApp Files service takes place in SMB protocol, as shown in Figure.

The SMB shares that need to be published for file sharing should be configured as virtual directories in the IIS server with the Directory Browsing option enabled. Users can access these shares just by typing the URL of the virtual directory. The URL contains the IIS server name and the name of the virtual directory, that is, http://IIS Server Name/VirtualDirectoryName.

Configuring web based file sharing

This section explains how to configure Web-based file sharing on a Azure NetApp Files. The SMB share that needs to be shared over the Web should be configured as a virtual directory on the IIS Web server. The IIS server will publish the virtual directory and the users can access the directory from their browsers using the http protocol.

Step 1 

Create Azure NetApp Files SMB Share for step by step procedure refer this link

On a SMB share, create a target directory to host the contents of the Web page or the directory that needs to be shared across. In this example, the target directory has been created as “IIS_test” in default “home” share.

Step 2 

From the IIS manager Connections panel, expand the “site” tree. Right-click the ”Default Web Site” and select the “Add Virtual Directory…” option.

This opens a dialogue box to enter the path and authentication for the virtual directory.

Step 3 

Enter the “Alias” for the site (here it is given as IIS_test) and the path of the directory created in step 1. 

Note: The path should be the UNC name of the appliance directory, not the mapped drive. For instance, if the appliance share and directory name are \\anf-smb-server-name\sharename\diriectoryName\ the share is mapped in the Web server with a drive letter M. In step 3, the directory should NOT be specified as M:\dir_Name and it should be \\anf-smb-server-name\sharename\diriectoryName\

Click ”Connect as…” to configure the user credentials.

Step 4 

On the “Connect AS” dialogue box, select the “Specific User” option and click the “Set…” button to specify the user credentials. The user should have Full Control permission on this folder.

After configuring this, click on “Test Settings…” to validate the authentication and authorization of the specified user credentials. 

The virtual directory has been created and published. 

Step 5 

To enable directory browsing, on the Features panel select the “Directory Browsing” icon and click “Enable” in the Actions panel. Select the format of the directory listing if required. 

The directory listing is now enabled and users can access this directory from their browsers.

Azure NetApp Files Applicability in IIS deployments

IIS has a ‘shared centralized global configuration’ feature, whereby multiple servers in a Web Farm can share the same configuration settings by hosting the files on an UNC share. In IIS configuration, there are multiple places where traditionally you would point to a local or UNC share, you should be able to point to the Azure NetApp Files file share.

Whether you are configuring Web Site, Application or FTP physical path, the steps are very similar,

Note – must be UNC format! Using mapped drive (e.g. Z:\) will not work!!! (mapped drive is only for the local user session)

  • In ‘Connect as’, specify the user name/password of the local user 

If there is a ‘Test Settings’ option then ‘Authentication’ should pass (ignore the ‘Authorization’ error).

Why Azure NetApp Files?

Some advantages of using Azure NetApp Files for your web server deployments are as listed below,

Support for SMB 3 

SMB 3 comes with most significant updated functionality compared to previous versions, some of which include the capabilities like SMB encryption, SMB Direct, SMB Transparent failover, for more info about SMB 3 refer the link

ANF Snapshot Technology

Compared to competing snapshot technologies, Azure NetApp Files Snapshot offers the advantages of better stability, performance, scalability, user visibility and file recoverability, and storage utilization, for more info about snapshots refer the link

Separation of data and network

In any storage deployment, data and the network are the two significant parts. It is very important to have the data and the network independent of each other to avoid any single point of failure. Azure NetApp Files architecture separates these two parts naturally. This enables a high-availability solution on both the data and the network sides. Azure NetApp Files if offered with 99.99% availability. 

Sharing data across multiple IIS servers

Azure NetApp Files provide an excellent data sharing solution via the SMB protocol. When multiple Web servers  require the same data or different data from the same storage, Azure NetApp Files share serves the requirement flawlessly.

Dynamic Performance scaling

Based on the performance requirement for you can at any point increase/decrease the size of the SMB share for getting a higher/lower performance on the fly without having to unmount or any impact to the users/application. The performance would depend on the service level and the size of the share you define on Azure NetApp Files for more information about performance sizing refer the link

Summary

Azure NetApp Files provide an excellent data sharing solution via the SMB protocol. When multiple Web servers (IIS)) require the same data or different data from the same storage, Azure NetApp Files serves the requirement flawlessly.

1 comment

  1. Thanks; Alas, this doesn’t work. I have a web app in C# that looks for files on a mounted (non-Azure) P:\ drive. We can write to the P:\ through the web app by specifying the path to the drive and it’s default folder in our appSettings config (key value is P:\defaultfolder\).

    But when we try the above to reference our Azure instance, IIS and the web app simply won’t connect to it.
    The path we try is “VirtualDirectoryName\defaultfolder\” We moved it over to Azure, and followed the above to get it to work, but we’re getting an “Access to ‘VirtualDirectoryName\defaultfolder\’ is denied error. This is despite the user having write/modify access. Help!

Leave a Reply

%d bloggers like this: