How To Expose Files in a Shared Folder for Remote Access with SharePoint

June 23, 2008

I just completed a Proof-of-Concept setup to allow the users to remotely access files that sit on a network share, using SharePoint and IIS 6.

I have a shared folder in \SHARE2007Shared and I wanted it to be accessible from http://share2007 (the SharePoint portal site).

The outline of the setup is like this:

  • Add a new File Share Content Source to SharePoint (MOSS) search settings, pointed at \SHARE2007Shared

    image
    image

  • Run a full crawl and check that it indexes the files correctly, searching for a file. Notice that the URL of the file is pointing at the file share directly.

    image
  • Open the IIS console and add a new virtual directory within the SharePoint portal site, pointing it at \SHARE2007Shared. Give it any name that suits you. (I chose “uncshares”). I use a fixed identity to access the file share, because SharePoint crawler will perform the security checking for the current user and I avoid identity delegation to the file share.

    image
    image
    image

  • Add a new Server Name Mapping in search settings, replacing file://share2007/shared references to http://share2007/uncshares
    image

  • Run a full crawl, again

  • Search for a file from SharePoint portal. You should notice that the displayed URL is pointing to the IIS virtual directory, not to the file share directly.

    image

Profile picture

Written by Edin Kapić Insatiably curious code-writing tinkerer. Geek father. Aviation enthusiast. Cuisine journeyman. Follow me on Twitter