If you're a regular user of SharePoint 2007 you'll know how useful it is to be able to open one of the Office client applications like Word or Excel and then open a document located on a SharePoint site by directly entering a URL into the Open dialog box. In fact if you know the correct URL you can open or even map an entire document library for browsing directly from the command line, eg.

(Assuming that the site you're trying to reach is located at http://intranet/Shared%20Documents/)

Something like the following would do the trick:

net use g: \\intranet\DavWWWRoot\Shared%20Documents\

However if you are on a Windows 2008 machine and you try to open a file from a SharePoint site or map a drive to a document library  you'll run into some problems, the root cause of which is down to the fact that W2K8 does not have the required services enabled by default which are needed to support this kind of network access - in fact the services aren't even installed by default.

We'll take a look at how to enable this service in a minute but before that, a little bit of theory:

As a user you're probably used to browsing to either the local c:\ or the \\someserver\c$ on another machine without giving much thought to how this works. When you type the address of a particular file, Windows works out if it's the local filesystem or a remote server you want to connect to and if it's anything other than the local filesystem the request is passed to a component called a Redirector. The Redirector has the knowledge on how to connect to the remote source of data, download the file and pass it back to Windows which then passes it back to you or your programme. The default Redirector for accessing Windows network shares via the NETBIOS or SMB protocols is called the "Client for Microsoft Networks" and you can enable or disable this via the properties of your network card. Disable this and you won't be able to access network shares anymore.

 

In order to connect to a SharePoint Server you need a Redirector which knows how to talk to the remote server using the WebDAV protocol. This is where the WebClient service comes in. This is an actual Windows Service which you'll find in the Services MMC and uses the WebDAV protocol to speak to remote servers which are enabled for incoming WebDAV connections. By default this service is not installed and must be enabled by the administrator.

To enable the WebClient Service follow these steps:

1. At the command prompt type: servermanagercmd -install Desktop-Experience

2. Reboot the server.

3. You might need to start the WebClient service manually.

The Desktop-Exterience feature enables Windows 2008 to support  visual elements such as the Aero interface usually only found in Vista and Windows 7. However support for accessing WebDav shares is also part of the feature and adds support for WebDav via the WebClient service which is also installed.

When the machine restarts you should be able to map a network drive to a Document Library on the SharePoint server as shown at the top of this page, ie. net use g: \\intranet\DavWWWRoot\Shared%20Documents\

The key thing to understand is that as soon as Windows sees \\intranet\DavWWWRoot\ it thinks, "Ah this isn't actually a normal fileshare, the user is wanting to access a folder over the WebDav protocol on the http://intranet site so I must pass the request to the WebClient for processing".

Now if you open Word and click File->Open you'll probably notice the absence of any SharePoint shortcuts on the left hand side. You can type the full URL of a file to open from a document library and it will be opened however the client application won't see these folders as special.

To get around this, you need first to browse to your SharePoint MySite. Once there you'll see the following pop-up message appear:

Click Yes. This will create the following registry entry on your local machine:

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\Server Links\Published\My Site\My Site]
"LinkType"=hex(b):02,00,00,00,00,00,00,00
"IsMember"=dword:00000001
"IsPublished"=dword:00000001
"Url"="http://mysite/personal/administrator/"

(You can delete this key if you want Windows to "forget" where your MySite is located)

If you then open any of the Office client applications (Word will do for our purposes) it first talks to a web service at http://mysite and obtains a list of SharePoint sites which you have access to. This list is downloaded as a series of shortcuts and added to the folder:

C:\Users\<username>\AppData\Local\Microsoft\Office\My SharePoint Sites

(When you open any file dialog in an Office client, these shortcuts are displayed under the "My SharePoint Sites" node of the Favorite Links pane.)

Word then creates a new registry key to record when the list above was last checked:

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\Portal]
"LinkPublishingTimestamp"=hex:5f,f8,45,4c,00,00,00,00

The list is updated every 24 hours but you can force an update by deleting this key and re-opening any of the Office client applications.

It's possible that as a farm administrator you might want additional links to appear in a users set of shortcuts, this can be easily acheived by a by clicking on the "Published links to Office client applications" link in the User Profiles and MySites section of the SSP and entering the details of the desired link into the list. You may use audiences to control which users get given which shortcuts. Delete the "LinkPublishingTimestamp" registry value as described above and re-open Word to pickup the changes.

Final notes:

You DO NOT need to install the WebDAV client for IIS 7.0 / 7.5 which is available from www.iis.net. SharePoint has it's own built in WebDav server which handles the incoming requests.