Using DFS to distribute your web application over your network: A Step By Step Guide.


Introduction

Often times you will find yourself in a situation where you wish to place resources for your web application on different servers on your network. Some common implemenations could be a file server that stores images or an application server that houses static files or xml content. This can be accomplished fairly easily using DFS. (Distributed File System) I found that most of the documentation for DFS online was very convuluted and failed to get to the point. I have broken the task of created a distributed web application in IIS and DFS down into a few simple steps. If you are lucky enough to have found this siple guide it should save you a lot of time.


  1. Access in your control panel and start the service "Distributed File System" and set the service to start automatically.
  2. Share the folder that will act at the root folder for your web application.
  3. Set permissions on the share to allow write access.
  4. Open the DFS management console.
  5. Create a new DFS root.
  6. Choose stand alone root.
  7. Type in the name of your web server.
  8. Type in the share name created in step 2 that holds the root files for your website. This will activate the share that we created earlier as a DFS root.
  9. Right click on the dfs root that you created and choose "New link...". Assign the link a name. This name will appear as a folder in your dfs root. Finnally type in the UNC path or browse to the network resource that you wish to include in your web application.
  10. Now browse to your web server by its unc path. (ie: \\servername). You will see the dfs share that we created earlier, If you browse to this folder you will see the folder that you specified in step 2 along with with what appears to be a folder with the name that you specified as link name in step 9.
  11. When you browse to this folder you will see the files from the remote server that you specified. But we are not in the clear yet, there are stilla few more tricks we need to do to get this to work.
  12. Go into IIS and create a new site. Setup path of the website to point to the unc path to the dfs root that we created.
  13. Specify a username and password that has appropriate permissions to access the DFS root. I recomend that you create a new username for this in case a password is changed.
  14. Browse to one of the files via your web browser. It will load the file from your remote server.
img1
fig 1

View full image.
A Programmers Journal |