Exposing Large Files Like Videos in a SharePoint Document Library Using IIS Virtual Directory 

Tags: How To, IT Pro, Admin, SharePoint Designer, SharePoint 2010, Pre SharePoint2010, Security, SQL Server

I wrote an unpublished post before SharePoint 2010 was released on how to create a feature to store items in a document library on the file system. The benefit of this is that all web front ends have access to the video without any further configuration. The downside is that all web front ends store a copy of the file on the file system. If you have a 500 MB video, this may not be ideal or even possible. Also, each time you want to post new video(s), you must create a new feature.

Another option is to expose the content on IIS via a virtual directory. This works in WSS 3.0, MOSS and all versions of SharePoint 2010.

Here are the steps

  • Preparation: decide which account will impersonate the current user. The SharePoint search crawl account will suffice, but whichever account you use, you will need to know the password.
    • If you are using (or are ok with) anonymous access, consider uploading your videos to a public host like Youtube or Vimeo to ease the burden on the SharePoint Farm's network.
  • If you have not done so, create a directory that IIS can see. If you have multiple web front ends, a single shared directory for all of them is desirable.
  • Give the account from Step 1 read permissions to the directory on the file system.
  • Set up a virtual directory called video (or whatever) under the SharePoint IIs site pointing to where the videos and other files are.
  • In IIS, right click on the virtual directory > manage > permissions. Impersonate the account chosen in step 1.
  • Repeat the steps for all web front ends in the farm.

Notes and Considerations

This is not a "no brainer" for all situations; it's a brainer – you may need to consider some things.

Security

  • The above process allows authenticated users access all the files in the virtual directory.
  • You may modify web.config file(s) to allow and deny to files and folders.
  • Permissions may not be set using SharePoint groups, only AD and local users. is available

Remote blob storage (RBS)

  • Remote blob storage (RBS) is for specific content databases.
  • This means that if you want to go this route, it will be for all documents in the site collection.
  • RBS is not backed up in your regular SQL Server backup which means that a common primary goal of backing up documents is broken. This could be mitigated by dedicating a site collection with its own content database set up for RBS to host the videos.

Advantages of using a feature

  • If you have multiple web front ends, the virtual directory must be configured for each of them manually whereas the feature will do this for you.
  • The feature allows finely tuning permissions using the OOTB SharePoint UI.
 
Posted by AndyGett on 1-May-12
0 Comments  |  Trackback Url | Bookmark this post with:        
 

Comments

Name:
URL:
Email:
Comments: