WSS2: Stsadm.exe removes existing web.config files

I'm writing an installer to install a SharePoint site onto a server and have found some strange behaviour in stsadm.exe.  The relevant portion of my installation goes like this:

  1. Create a new directory
  2. Create an IIS web site on this directory
  3. Deploy my application files into this directory
  4. "Extend" Windows SharePoint Services (WSS) onto this new website

You may think (as I did) that this looks fine.  However, after my installed application started throwing exceptions I looked at the installed file structure and this is what I found:

explorer

Hang on, I didn't create the web_2006_11_20_16_8.config file, although it does actually contain my application configuration.  And it also contains the WSS configuration I want to apply.  Some investigation with Sysinternal's ProcMon tool revealed the following:

procmon

It turns out that the WSS utility STSADM.EXE (using the extendvs operation) decides to copy the existing web.config file and rename it with a timestamp.  It then goes and creates it own.  How annoying. So now my installation steps are as follows:

  1. Create a new directory
  2. Create an IIS web site on this directory
  3. Deploy my application files into this directory
  4. Deploy my web.config file into a temp directory
  5. "Extend" Windows SharePoint Services (WSS) onto this new website
  6. Copy my web.config file from the temp directory into the application directory

And now it works!

November 20 2006

MOSS: Installing Microsoft Office SharePoint Server 2007

Just thought I'd share a great link on installing Microsoft Office SharePoint Server 2007 (MOSS).  You can get the low-down at:

http://blogs.msdn.com/martinkearn/archive/2006/04/10/572428.aspx

I was reinstalling MOSS after a failed previous attempt, and was told by the installer that "The language is not supported on the server" - I presume error messages like this actually do mean something to someone, but not to me.  Anyway, there is a simple solution which can be found at:

http://mcosier.blogspot.com/2006/05/language-is-not-supported-on-server.html

August 29 2006
Newer Posts Older Posts