FrontPage Contortions

 

For editing of static content I like to use FrontPage and I’ve been reasonably happy with the HTML editing features that FP2003 provides. For the most part it does a pretty good job with creating clean markup and leaving alone my code inside of pages. It even is smart enough to detect ASP.Net components in pages and in some cases even display them (that is if you configure the project correctly). Since the VS editor is completely useless for WYSIWYG editing I often use both VS and FP in conjunction with good results.

 

I also like the way the projects work and how there’s a publish option to quickly publish files to a Web Server when you’re already working in FP. This especially useful when updating images etc as I can quickly run through pages and then simply upload the images on demand.

 

I also use FP for content management on my site. Even though I have tons of content all over the place most of the content is more or less static (save the ‘real’ applications), so all the master product pages and Web home page are static and I use FrontPage for that.

 

While I can see a lot of things working better FrontPage works for me since I don’t particularily enjoy hand coding HTML, especially for static content like a home page. So much for the good news… <g>

 

Today I decided I needed to get my Web site and my local set up into closer sync so I needed to rename a few virtual directories and move a few applications around on the hard disk. The brunt of all of this is to make my dev/staging environment here match the only environment so there’s no confusion – I hate demo’ing some code at a conference online showing it in one dir structure and then jumping to local dev and showing another structure. More than once did I in the heat of things forget what the ‘other’ path was, much to the amusement of those in attendance…

 

Anyway, this process is not a fun one. Basically I needed to move a couple of directories and then re-assign the virtuals in IIS. The actual process goes something like this:

 

  • Shut down IIS to make sure all files are released
  • Copy the directory to a new location
  • Go into IIS and remove the virtual
  • Delete the original directory (Remove from within the IIS Mgr – it will delete the directory. There appears to be no way to just remove the virtual).
  • Create the new virtual in the service manager and point it at the new location
  • Open the VS.NET solution file for the application and edit the location of the Web project.

 

Now repeat 3 times…

 

Although this isn’t exactly trivial especially if you’ve never done this before – at least this process is somewhat logical and it works consistently. Note that the last step is probably one that not everyone is familiar with. A VS.NET Solution contains a reference to the URL to the Web application and you should edit this in the SLN file rather than letting VS prompt your for it – which in my experience usually doesn’t work correctly in getting to the site. Better to have it in there the way you want it.

 

Make sure when you create or copy the new directory that you set permissions properly to allow Admins full access as well as access for Network Service/ASPNET accounts.

 

The last step and most painful step however is getting FrontPage to recognize the new virtual and display it as part of either the main Web or as a new subweb. First after the above changes opening up FrontPage results in the new virtual not being found at all. Not as a directory beneath the Web, nor as a sub-web.

 

So the next stop (and this is not exactly obvious) is the IIS Service Manager and right click on the Web Root to Check Server Extensions 2002. Interestingly enough there’s nothing FrontPage in this title although most of these extensions are definitely related to FrontPage and crucial for it to find its Webs. I use IIS 6 and this is a little easier than in IIS 5 where you had to hunt for the Front Page Extension checker – the prompts there were very confusing. Note that in order to administer the FrontPage Web you need to make sure that the Sharepoint Administration Web is running otherwise none of these links work.

 

I ran a quick server check and it found a few things to clean up – basically some temporary Web apps I created with VS and immediately tossed. However, it did not find or want to delete the old virtual even though that virtual didn’t exist anymore under that name. Try as I might it wouldn’t delete nor could I create a new SubWeb because of this problem. The troubleshooting note prompted to delete a file several levels into the Web which didn’t do squat.

 

Eventually I just nuked the FrontPage directories (the _vti_ dirs) in the virtual and ran check extensions again. This time it figured out the Web is no longer there and removed it. Now I could go in and create a new subweb simply by pointing at the virtual.

 

Note that during all this the app was working fine. IOW, IIS knew where the virtual sits, ASP. Net could find it and the application runs fine, yet FP runs around with its head cut off trying to make sense of something as simple as a renamed virtual directory.

 

This amount of contortionism is ridiculous. The gunk that FrontPage puts out into a Web is pretty painful as it is, but it should at least be smart enough to read IIS’s structure and be able to deduce what is available. Changing the name of a virtual is major task even in the IIS Service manager alone, but with FrontPage involved this becomes a real nightmare.

 

Luckily I’m done now, and now that I wrote this down, maybe next time I won’t be sitting around picking the wrong menu options over and over again…