
FrontPage Server Extensions and the IIS Metabase
Originally published on my old blog at cumps.be on April 9, 2004.
Currently I’m playing around with IIS and C#, and something I discovered is the following:
First, take a look at the FrontPageWeb property available in the IIS Metabase.
This says:
Setting FrontPageWeb to true causes FrontPage Manager to create the files required for FrontPage Server Extensions. Setting FrontPageWeb to false causes these files to be deleted.
Everything seems alright, just like every other property I set this to true and expect it to work. Like this:
// First we get the AD object representing our webserver
DirectoryEntry iisServerRoot = new DirectoryEntry("IIS://localhost/W3SVC");
// We create a new site on the specified siteId
DirectoryEntry deNewWwwSite = (DirectoryEntry)iisServerRoot.Invoke("Create", "IIsWebServer", 10);
// Takes care of FrontPage Manager providing files for FrontPage Extensions
deNewWwwSite.Properties["FrontPageWeb"][0] = true;
deNewWwwSite.Invoke("SetInfo");
deNewWwwSite.CommitChanges();
deNewWwwSite.Close();
deNewWwwSite.Dispose();
(Most stuff left out)
Well, it didn’t work. In IIS it would still say FrontPage Extensions were not present, and the directories weren’t created.
I looked everywhere to find something else involving FrontPage, without any luck.
But then I found this KB article (300543). And although it’s talking about IIS 4.0, 5.0 and 5.1, it does work on IIS 6.0 as well.
So here you go, to install FrontPage Extensions you have to run owsadm.exe, replacing SITEID and USERNAME:
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\50\bin\owsadm.exe" -o install -p /LM/W3SVC/SITEID -u USERNAME -sp publish
And to uninstall them:
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\50\bin\owsadm.exe" -o fulluninstall -p /LM/W3SVC/SITEID -u USERNAME
You May Also Like

Parameterized Queries with MySQL
Switching to parameterized queries with MySQL and MyODBC: don't put quotes around the ? placeholders, or you insert a question mark.

Visual Basic 6 DBGrid: Empty Cells AllowSizing Bug?
Unchecking AllowSizing on a VB6 DBGrid leaves it showing rows without text; Clear Fields fixes it but turns AllowSizing back on.

Differences between PHP and ASP.NET
Answers to a forum question for PHP developers moving to ASP.NET with C#: quotes, output, operators, string formatting and arrays.



