Jérôme Laban

.NET Powered

SharePoint WebDAV, IIS 7.5 and Windows Server 2008 R2

clock December 2, 2009 18:02 by author jay

A neat feature of Sharepoint 2007 (or WSS 3.0) is the ability to browse the content of a site as if it were a network drive. This is done under the hood by using WebDAV, a standard protocol that Microsoft used to implement this feature.

If you happen to have to install WSS 3.0 on a Windows 2008 R2 Box, you’ll quickly find out that this feature does not work properly, with interesting messages like “Access Denied” or “The network path could not be found” when trying to map a folder.

Using IIS 6.0, you’d simply need to make sure that the WebDAV Web Service Extension is “Prohibited”.

With IIS 7.5, there are multiple places dealing with WebDAV but only one to look at :

  • Open the “Modules” configuration section for the Sharepoint web site
  • Find the “WebDAVModule” entry
  • Remove it, your’re done !

The interesting bit about this is that even though the WebDAV component is disabled in every possible section of the site, the module seems to intecept the WebDAV PROPFIND verb and returns a 405 (Not Allowed) error.

Since the verb is handled by an ASP.NET httpHandler, it never gets the chance to deal with it... and you can’t see your files in the Windows Explorer.



SharePoint : The database connection string is not available. (0xc0041228)

clock March 31, 2009 20:21 by author Jay

A Sharepoint Services 3.0 setup I'm managing had a few issues lately, and I had to bring back up an old version of the system. The original setup had a Search Server Express 2008 installed, and the backup I restored did not, even though I had the databases for it.

After reinstalling everything that was needed, and having the Search Server properly indexing content, I kept having a lot of messages like "The database connection string is not available." in the event log, and "Your search cannot be completed because of a service error." in the search tool in any Sharepoint site. I had the content database properly associated with the correct indexer.

I did not notice at first that the service named "Windows SharePoint Services Search" was not started, and when I tried to start it, I had a nice "The handle is invalid." error message... Not very helpful.

A few posts around the web were suggesting to stop that service, then restart it. One suggested to check the user account of that service, which was "Network Service" for me. I changed it to the same domain account that the "Windows SharePoint Services Timer" service is using. At this point, the service was starting properly, but I was still having the "The database connection string is not available." message.

In the "Services on Server", I tried stopping the "Windows SharePoint Services Search" service, (telling me that it was going to delete the index content), which succeeded. But trying to restart the service gave me an error saying that the database already had content, and that I had to create a new one.

I did create a new database, but the service would still not start, this time giving an other error message that I enjoy so much : "An unknown problem occured".

I went back to some forum posts, and I came across a command to "initialize" the service from the command line with STSADM :

 stsadm -o spsearch -action start -farmserviceaccount [domain_account] -farmservicepassword [domain_account_password]

Which at first gave me this :

 The specified database has an incorrect collation.  Rebuild the database with the Latin1_General_CI_AS_KS_WS collation or create a new database.

I did re-create the database with the proper collation, then ran stsadm again and it gave me this : 

 The Windows SharePoint Services Search service was successfully started.

Hurray ! That did the trick, and indeed, my searches in any Sharepoint sites were not returing any error. I just had to wait for the service to refresh its index, and my search was running again !

This is a long and verbose post, but I hope this will help someone with this cryptic message...

 

 




About me

My name is Jerome Laban, I am a Software developer and .NET enthustiast from Montréal, QC. You will find my blog on this site, where I'm adding my thoughts on current events, or the things I'm working on, such as the Bluetooth Remote Control Software for Windows Mobile.


Sign in