Last week I installed hotfix 941653 and hotfix 950292 (post SP1) to a client site to fix the dreaded Error: 'length' is null or not an object that occurs with Office 2003 Standard edition and MOSS Content Types. Unfortunately, not only did the problem remain (i.e. the hotfix fixed nothing), but I started to get 403 (Forbidden) errors when I tried to navigate to Search Settings page.
To fix this problem, I had to do the following:
From the index server (I've got a front-end web server and a backend index server, both 64 bit):
stsadm -o search -action stop -f
then I did
stsadm -o search -action start -role indexquery
then I did a:
stsadm -o execadmsvcjobs
Then I went back to the front end web server, navigated to the Shared Services Admin page, selected the SSP site, then from its context menu selected 'Edit Properties'. Then from the screen I reselected what the Index server was. After this, on the front end server I did a stsadm -o execadmsvcjobs. Then search started working again (but as the index was blown away, I had to do a full reindex).
Monday, April 28, 2008
Friday, April 04, 2008
Fiddler2 and Pipeboost are your friend!
To my surprise this week, one of the sites that I am helping with went live (deployed by the customer). One of the comments from the customer was 'it is quite slow'. Well to help identify what was going on, I brought out my trusty friends - Fiddler2 and Pipeboost.
Fiddler2
Basically, Fiddler is an IE add-on that monitors what comes down the wire to the browser whenever you request a page. In includes all the details about what types of files are downloaded (jpg, swf, css, js etc) and how long it takes. It even provides a pie chart to show what file types are causing the biggest payload. My first test on the site was with all of my cache cleared (so that I measure the performance of the first time visitor to the site). Yes it was definitely slow. My second request was done without clearing the cache. In this report however, it showed that although the flash files were being cached, All of the images stored in the SiteCollectionImages library were not.
So Fiddler helped me to identify that the BlobCache had not been configured on the server. This is a setting in the Web.Config file. It helps IIS to store images that are stored in SharePoint (and therefore in the backend database) to the local file system. Thus making subsequent requests for those resources a whole lot quicker (because a SharePoint database request is not required). The syntax for BlobCache is as follows:
Pipeboost (www.pipeboost.com)
Pipeboost helped me to identify whether or not IIS Compression had been configured on the production server. As most of you would know, browsers such as IE can handle compression. There is a handshake that goes on between the server and the browser to see whether the browser supports compression. If it does, then IIS compresses the contents (thus reducing the payload) and sends it to the browser, where it is decompressed and displayed to the user. There are two types of content that can be compressed - Static (like images) and Dynamic (like ASPX pages). Static compressioncan compress the file as well as stores it in the Temporary Internet Files directory, so that it can be served up quicker next time. Dynamic waits for the ASPX to return its content, then it just sends that page compressed back to the browser (i.e. it doesn't store it in the Temporary Internet Files location).
There is a great article at http://www.dotnetjunkies.com/Article/16267D49-4C6E-4063-AB12-853761D31E66.dcik that explains how to setup IIS Compression. At the end of this article, it talks about Pipeboost, which can tell you whether or not the payload returned from the web server is compressed (i.e. via IIS Compression).
Fiddler2
Basically, Fiddler is an IE add-on that monitors what comes down the wire to the browser whenever you request a page. In includes all the details about what types of files are downloaded (jpg, swf, css, js etc) and how long it takes. It even provides a pie chart to show what file types are causing the biggest payload. My first test on the site was with all of my cache cleared (so that I measure the performance of the first time visitor to the site). Yes it was definitely slow. My second request was done without clearing the cache. In this report however, it showed that although the flash files were being cached, All of the images stored in the SiteCollectionImages library were not.
So Fiddler helped me to identify that the BlobCache had not been configured on the server. This is a setting in the Web.Config file. It helps IIS to store images that are stored in SharePoint (and therefore in the backend database) to the local file system. Thus making subsequent requests for those resources a whole lot quicker (because a SharePoint database request is not required). The syntax for BlobCache is as follows:
Pipeboost (www.pipeboost.com)
Pipeboost helped me to identify whether or not IIS Compression had been configured on the production server. As most of you would know, browsers such as IE can handle compression. There is a handshake that goes on between the server and the browser to see whether the browser supports compression. If it does, then IIS compresses the contents (thus reducing the payload) and sends it to the browser, where it is decompressed and displayed to the user. There are two types of content that can be compressed - Static (like images) and Dynamic (like ASPX pages). Static compressioncan compress the file as well as stores it in the Temporary Internet Files directory, so that it can be served up quicker next time. Dynamic waits for the ASPX to return its content, then it just sends that page compressed back to the browser (i.e. it doesn't store it in the Temporary Internet Files location).
There is a great article at http://www.dotnetjunkies.com/Article/16267D49-4C6E-4063-AB12-853761D31E66.dcik that explains how to setup IIS Compression. At the end of this article, it talks about Pipeboost, which can tell you whether or not the payload returned from the web server is compressed (i.e. via IIS Compression).
Strange Behaviour when Editing a SharePoint Search Resuls Page
As part of the the work that I do with my own company (MS-Advantage), I get to work on a lot of interesting projects, as well as work with a lot of interesting partner/development companies.
For example, currently I am doing some work on the side with a Graphic Design company who have been charged with developing the branding for a global web site. I basically provide them with guidance on how to best use and develop with SharePoint, while they do the leg work of developing the master pages and page layouts.
While I was working on the project yesterday, the customer indicated that the Search results page was returning sites and list information that they did not want to appear. To resolve the issue, I went into the search results page, edited the core results web part to add an additional query to the results (Query2 and isdocument:1, which basically says 'only show pages or documents').
Well I checked in a draft version of the search results page and started to test that it worked. As the results returned was exactly what I was after, I then published the page (so that it would get picked up in that night's content deployment job). After publishing the page however, every time I navigated to the search results page (even without providing a search keyword), the search results that I had previously used while testing were still being displayed. I tried to roll back to previous versions, but that didn't help. In the end I had to open up the page in SharePoint Designer, AND TO MY HORROR SharePoint had injected the results HTML into my web page. Once I deleted this and saved it, I was then able to re-publish the page.
For example, currently I am doing some work on the side with a Graphic Design company who have been charged with developing the branding for a global web site. I basically provide them with guidance on how to best use and develop with SharePoint, while they do the leg work of developing the master pages and page layouts.
While I was working on the project yesterday, the customer indicated that the Search results page was returning sites and list information that they did not want to appear. To resolve the issue, I went into the search results page, edited the core results web part to add an additional query to the results (Query2 and isdocument:1, which basically says 'only show pages or documents').
Well I checked in a draft version of the search results page and started to test that it worked. As the results returned was exactly what I was after, I then published the page (so that it would get picked up in that night's content deployment job). After publishing the page however, every time I navigated to the search results page (even without providing a search keyword), the search results that I had previously used while testing were still being displayed. I tried to roll back to previous versions, but that didn't help. In the end I had to open up the page in SharePoint Designer, AND TO MY HORROR SharePoint had injected the results HTML into my web page. Once I deleted this and saved it, I was then able to re-publish the page.
SharePoint Deployment Guide and Checklist
While I was at the SharePoint Conference in Seattle, I attended a session on 10 Steps to Governance (presented by Brian Cook and Joel Olesen). Just before the session started, Microsoft were handing out a little pocket guide called the SharePoint Deployment Guide and Checklist. It contained lots of useful information about governance plans, deployment checklists and deployment team roles.
When I showed it to a few guys I work with, they thought 'hey, where can I get a copy'. Well, I found it online at http://office.microsoft.com/download/afile.aspx?AssetID=AM102552101033.
So enjoy!
When I showed it to a few guys I work with, they thought 'hey, where can I get a copy'. Well, I found it online at http://office.microsoft.com/download/afile.aspx?AssetID=AM102552101033.
So enjoy!
Sunday, March 09, 2008
SharePoint Conference catchup with Heather Solomon
While I was at the SharePoint Conference in Seattle, I caught up with Heather Solomon (SharePoint branding MVP) from SharePointExperts.com.
Below are some of the tips and tricks that we discussed (and some of my own tips):
Below are some of the tips and tricks that we discussed (and some of my own tips):
- Explore using CSS to customize the OOTB navigation controls before you go out venturing on creating your own.
- Incorporate the @import to include your CSS in your Master Pages. Heather's opinion is that you should only use the alternate CSS option to tweak particular areas.
- Store your CSS and branding images on the web server. Images go in their own directory under 'Template\Images'. The CSS file should be stored inside a directory under 'Styles' (under the 12 hive).
- Package your branding in Solution Package/Feature. Check out
http://codeplex.com/stsdev for a Visual Studio Project Template for this (developed by Ted Patterson and Andrew Connel) - On the development machine, turn off custom errors in the web.config (
set Callstack = False. Set CustomErrors=Off) - Apart from using Alternate Stylesheets, Themes can also be used to help brand the Application.master template (remember you can't actually change the HTML structure though)
- Meeting Workspaces do not pick up your custom master page. There is some special code in the meeting workspace master page that renders the multiple meeting navigation that you normally see on the left hand side. You need to create a separate masterpage for the meeting workspace, then create a feature stapling to the meeting workspace to change its default master page.
- Blogs and Wikis use different styles, so be careful
- Take advantage of contextual selectors (e.g. div#mydiv ms-SPLink {...} )
- The word specificity (which I can never pronounce in meetings) basically means that a number is derived from the way in which an element is styled. Sometimes you see styles overriding others when you see things like class names sitting right next to the element. Think of the number as A-B-C. For each ID that you use, you add 1 to A. For every class you use, you add 1 to B. Then for a base class definintion, you add 1 to C. So p#largetext ul.mylist li has a specificity of 1-1-1 (or 111). If I just set a style on li (corresponding to a specificity of 1), the specificity with the highest number would be applied to the element.
- Don't go crazy with classes. Use IDs more often and classes sparingly. That way in your CSS, you can use contextual selectors to define a style. E.g. div#mydiv table tr td a { font-family: Verdana }. In this example I haven't used classes at all. I am basically finding the element by starting at the ID level first.
- Heather mentioned that in the past, she has seen SharePoint Designer take grouped styles (e.g. h1, h2, h3 ....) and separate them to h1 {} h2 {} etc (so adding more lines than what is necessary). Heather uses 'Top Style Pro 3.5' to author her CSS, but she hasn't tested opening up a CSS stored in the 'Style Library' areas (remember that she prefers to have the CSS stored on the web server).
Wednesday, March 05, 2008
Fab 40 Application Templates and Role-based My Site Templates Author
Tonight's SharePoint Conference's social evening was at the Museum of Flight in Seattle. During the night, I managed to catchup with Bob Sutton, Senior Product Manager within the SharePoint product group. After having a couple of drinks together (part of it on me unfortunately), we started to discuss the Application templates, and in particular the role-based My Site templates. How stupid did I feel when he said 'oh yeah, I wrote all of that!'. So now when I have questions (particularly about the My Site templates) I can go directly to the source. Thanks Bob!
I also got to meet Dave Page from Redmond Technology Partners, whose company was engaged by Microsoft to build the GearUp site, which is a site dedicated to providing IT professionals and business managers with timely resources and guidance through the SharePoint deployment cycle. It even includes an Internal Buzz Kit, which includes sample promotional emails, posters and PowerPoint slides - all vital pieces in the Communications Plan that all SharePoint projects should have (if you don't have one - get one. Otherwise your SharePoint project is likely to fail due to poor user adoption).
I also got to meet Dave Page from Redmond Technology Partners, whose company was engaged by Microsoft to build the GearUp site, which is a site dedicated to providing IT professionals and business managers with timely resources and guidance through the SharePoint deployment cycle. It even includes an Internal Buzz Kit, which includes sample promotional emails, posters and PowerPoint slides - all vital pieces in the Communications Plan that all SharePoint projects should have (if you don't have one - get one. Otherwise your SharePoint project is likely to fail due to poor user adoption).
Is that you Mike Fitzmaurice?
I nearly fell over tonight when I saw Mike Fitzmaurice (Microsoft Evangelist) for the first time in 12 months. He has lost about 40Kg and is shadow of the man he was before. Well done Mike!
A Possible Workaround with Content Types incorporating BDC lookups
I attended the session 'Creating Solutions with the Business Data Catalog' today at the SharePoint Conference, presented by Todd Baginski. At the end of the session, I had an idea on how to get around this limitation with Content Types (i.e. that you can add a BDC column to a Content Type). When question time came, I stood up and asked Todd whether my theory might work. He thought it was a very good idea.
So what is the idea? Well, basically it is quite a simple process to query the values in the BDC. You just need to know the the SSP name (e.g. SharedServices1), the LobSystemInstanceName (which appears in the Application Definition XML file) and the Entity that you want to query (e.g. Customers). Todd said that he will soon upload this sample code to his blog (I'm not much of a developer any more). You then take this sample code and wrap it in a custom Field Control. The User Experience will be that when you select that you want to create a field of type BDC, you select your custom type, then provide the 3 parameters required (or even a 4th to provide filtering). At runtime, the field control queries the BDC and returns the values in a drop down list. Under the covers, you could even store the associated ID of the selected BDC item. This could (potentially) be used for communicating with other BDC web parts (e.g. BDC Item web part), or could be consumed by other field controls that provide filtering capability (say to a duplicate field control that perhaps takes a 4th parameter to filter the BDC results). If you are a brave enough developer, give it a go and let me know how you go (I wouldn't mind a copy of the code).
So what is the idea? Well, basically it is quite a simple process to query the values in the BDC. You just need to know the the SSP name (e.g. SharedServices1), the LobSystemInstanceName (which appears in the Application Definition XML file) and the Entity that you want to query (e.g. Customers). Todd said that he will soon upload this sample code to his blog (I'm not much of a developer any more). You then take this sample code and wrap it in a custom Field Control. The User Experience will be that when you select that you want to create a field of type BDC, you select your custom type, then provide the 3 parameters required (or even a 4th to provide filtering). At runtime, the field control queries the BDC and returns the values in a drop down list. Under the covers, you could even store the associated ID of the selected BDC item. This could (potentially) be used for communicating with other BDC web parts (e.g. BDC Item web part), or could be consumed by other field controls that provide filtering capability (say to a duplicate field control that perhaps takes a 4th parameter to filter the BDC results). If you are a brave enough developer, give it a go and let me know how you go (I wouldn't mind a copy of the code).
Monday, March 03, 2008
I'm here at the MS SharePoint Conference in Seattle
As there wasn't going to be a SharePoint Conference in Australia this year, I decided to go this conference in Seattle, which focuses on Real-World SharePoint solutions. Apart from getting some war stories from other SharePoint Specialists, I'm looking forward to catching up with some world renowned MVP's and Arpan Shah from the Microsoft Product Team. I'm scheduled to catch up with him at the Ask the Experts Lunch on Wednesday.
Monday, November 26, 2007
Migrating InfoPath forms over to MOSS
Last week I had a customer that used InfoPath extensively for basic data capture. The forms themselves were quite basic. Most had a couple of data connections to SharePoint lists (for drop-down values), as well as the main Submit data connection. Modifying each of these forms involved migrating each of the lookup lists to the new SharePoint environment, creating the destination Forms Library to hold the submitted forms, modifying each of the data connections in InfoPath to point to these lists and libraries, and finally Publishing the form to the new location.
Of bigger concern was the fact that there were hundreds (if not thousands) of data files (i.e. .xml files containing submitted data). As you may or may not know, submitted InfoPath documents have a processing instruction at the top of the XML, which tells Windows that it is an InfoPath document, as well as where to get the InfoPath XSN template to load.
Fortunately, MOSS form libraries now have a new default view called 'Relink Documents'. By using this view, you can select each of the existing documents and relink them to the new template. Below is a screenshot:

Discovered a new issue with SharePoint 2007 stsadm Export function
Last week I had to move some team sites from an upgraded site into a new MOSS site structure. Normally when using the stsadm export function I use the following syntax, which ensures that I move across all document versions, as well as maintain document 'modified by' type information.
stsadm -o export -url http://moss_site/sites/projects/it_projects -filename it_projects.dat -includeusersecurity -versions 4
But this kept on failing for this particular site. On closer inspection of the export log I discovered that one document in the document library had 151 versions!! It was this document that was causing all of the problems.
My solution was to just move across the latest version of the document instead, which has the syntax:
stsadm -o export -url http://moss_site/sites/projects/it_projects -filename it_projects.dat -includeusersecurity -versions 2
Looking back on it now, I could have also tried to delete previous versions, but this could have been a trial and error thing (because I don't know what the export limit actually is - 50 versions? 100 versions? Who knows?)
stsadm -o export -url http://moss_site/sites/projects/it_projects -filename it_projects.dat -includeusersecurity -versions 4
But this kept on failing for this particular site. On closer inspection of the export log I discovered that one document in the document library had 151 versions!! It was this document that was causing all of the problems.
My solution was to just move across the latest version of the document instead, which has the syntax:
stsadm -o export -url http://moss_site/sites/projects/it_projects -filename it_projects.dat -includeusersecurity -versions 2
Looking back on it now, I could have also tried to delete previous versions, but this could have been a trial and error thing (because I don't know what the export limit actually is - 50 versions? 100 versions? Who knows?)
Thursday, October 25, 2007
Implications of WSS/SPS 2003 sp3
Although most of the time I am working on MOSS related projects, one of my clients still requires my support with SPS 2003. They had rebuilt the environment to be SPS sp2 on Windows Server 2003 service pack 2. If you didn't already know, this combination breaks the 'Create Site' functionality (it hangs on the Add Link to Site section). Anyway, last week I installed WSS/SPS service pack 3, which fortunately fixed this problem. However, today I discovered that the Rich Text Editor within the Content Editor Web Part no longer works. To fix this, you have to modify both ows.js and htmledit.aspx to include an additional JavaScript function called RenderActiveX. This function accepts a string, then just does a document.write(str) with it. Simple fix really, but it should have been tested more thoroughly before it was released.
Monday, August 13, 2007
Huge week at TechEd!
Well it was a massive week on the Gold Coast. The highlights for me were:
- Getting 100% on the MOSS configuration exam after only 2 hours of study at 5.30 in the morning.
- The Superman ride at Movie World
- Winning the Grand Prize!!!!
I am still not entirely sure what I have won (they are shipping it to me this week). But I did see a new Palm phone in the the basket of goodies. Apparently it is supposed to be worth $20K - I hope it is not all t-shirts and caps!
Tuesday, July 31, 2007
Export/Import traps for young players
Often when you are upgrading or migrating content to a new MOSS site, you will inevitably use the 'STSADM -o export' and 'STSADM -o import' commands. One of the 'traps' when using the export command is if the site you are exporting contains subsites, if you do not have access to that subsite (i.e. the subsite has not inherited permissions from its parent), then the subsite will not be exported (and hence will not exist after the import).
The other thing to be wary of is the use of the -includeusersecurity switch. If you do not use this switch in the export, and then again in the import, all content within the imported site will list you as the author. The downside in using this switch however is that all of the old security settings that existed in the exported site (e.g. WSS v2 Site Groups), will exist in the imported site, so you will need to do a cleanup afterwards.
The other thing to be wary of is the use of the -includeusersecurity switch. If you do not use this switch in the export, and then again in the import, all content within the imported site will list you as the author. The downside in using this switch however is that all of the old security settings that existed in the exported site (e.g. WSS v2 Site Groups), will exist in the imported site, so you will need to do a cleanup afterwards.
Two steps forward - one step back
There is no doubting that MOSS contains a bunch of new features that people find useful. But sometimes it astounds me that minor oversights have made it into the product. My biggest bug-bears include:
- When you navigate to a document library that has folders, you will see that the navigation breadcrumb is updated, thus allowing you to move around quickly in the document library(which is good). But drop that document library onto say the landing page, then the only way to navigate around the document library is to use the browser's back button. In WSS v2/SPS 2003, the web part automatically included an up link. So many of my clients have asked 'where has the up arrow gone?'.
- Events Calendar - hmmmm...where to start? OK, first of all there is no way to resize the control. So many team sites today include some sort of shared calendar. Dropping the web part onto the page (say in a standard two column layout), pushes the page out to the right, so people have to scroll. The only way that I have gotten around this is to purchase a third party web part like Kwizcom.
- Events Calendar again. There is no way to get a reliable 'What's on today?' view. First of all, the Start Time is not available in the Filter section within the view administration. The only way that I have gotten around this is to create a calculated field (e.g. Begin Time) that is equal to [Start Time] + 0.1, then create the view based on that calculated field. The 0.1 addition is required to cater for all day events. Without that, the event usually appears in the day before. But then comes the real problem - recurring events do not show up. This is because the Start Time field is based on when the recurring event should be effective from, not the actual start time of the event. The only way to get these events showing up (and you will love this one) is by editing each recurring event EVERY day, so that the Start Time changes to today (and hence shows up).
Let's home that either third party web parts fill these gaps, or a Microsoft patch fixes it.
Sunday, July 29, 2007
I've Been Busy
Sorry I haven't posted for a while. Since May I have been flat out working on MOSS projects, which hasn't left much time for writing. I will pick up my game again after TechEd (next week).
Thursday, May 24, 2007
Problem with News Redirector in MOSS
The redirector function within MOSS 2007 works fine if you are redirecting to a web page (for both normal read-only users and administrators), but when the redirect is pointing to a document (e.g. .doc or .pdf), then normal read-only users get the following:

Looking at the MOSS logs, we see the following:
04/29/2007 08:20:25.27 w3wp.exe (0x013C) 0x09F8 CMS Publishing 7fov Medium Caught a thread abort exception in TemplateRedirectionPage.ProcessRequest, the exception may be expected. stack trace= at Microsoft.SharePoint.Utilities.SPUtility.Redirect(String url, SPRedirectFlags flags, HttpContext context, String queryString) at Microsoft.SharePoint.Utilities.SPUtility.Redirect(String url, SPRedirectFlags flags, HttpContext context) at Microsoft.SharePoint.Publishing.WebControls.RedirectControl.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at Sys...
04/29/2007 08:20:25.27* w3wp.exe (0x013C) 0x09F8 CMS Publishing 7fov Medium ...tem.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.REDIRECTPAGELAYOUT_ASPX__855614915.ProcessRequest(HttpContext context) at Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ProcessRequest(HttpContext context)
When an administrator tries the same page, they see the page:

Then they are redirected to (in this case) a Word document.
NOTE: This is not a permissions issue to the document (i.e. the user can open the document directly).
Work Around
The only work-around is to change the 'Pages' library security settings (where the redirect page resides). For this, you will need to break the security inheritance from the parent News site. You must set all readers to have contributor access. To prevent malicious updates to the news articles, you simply configure the Pages library to require content approval, then setup an approval workflow to notify the administrator of the news area.

Looking at the MOSS logs, we see the following:
04/29/2007 08:20:25.27 w3wp.exe (0x013C) 0x09F8 CMS Publishing 7fov Medium Caught a thread abort exception in TemplateRedirectionPage.ProcessRequest, the exception may be expected. stack trace= at Microsoft.SharePoint.Utilities.SPUtility.Redirect(String url, SPRedirectFlags flags, HttpContext context, String queryString) at Microsoft.SharePoint.Utilities.SPUtility.Redirect(String url, SPRedirectFlags flags, HttpContext context) at Microsoft.SharePoint.Publishing.WebControls.RedirectControl.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at Sys...
04/29/2007 08:20:25.27* w3wp.exe (0x013C) 0x09F8 CMS Publishing 7fov Medium ...tem.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.REDIRECTPAGELAYOUT_ASPX__855614915.ProcessRequest(HttpContext context) at Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ProcessRequest(HttpContext context)
When an administrator tries the same page, they see the page:

Then they are redirected to (in this case) a Word document.
NOTE: This is not a permissions issue to the document (i.e. the user can open the document directly).
Work Around
The only work-around is to change the 'Pages' library security settings (where the redirect page resides). For this, you will need to break the security inheritance from the parent News site. You must set all readers to have contributor access. To prevent malicious updates to the news articles, you simply configure the Pages library to require content approval, then setup an approval workflow to notify the administrator of the news area.
.NET 3.0 Install Issues
I came across an issue today at a client site that was heavily locked down. Basically I could not get to any other web site except the windows update site using IE. This meant that when I ran dotnetfx3setup.exe (which installs just a stub then tries to download 33MB of data from the web), it fails because it cannot access the Internet. I got around this by using the Windows Update site. Using IE, navigate to Tools Windows Update. When the screen appears, select Custom. The .NET 3.0 software is listed as one of the optional components. Pretty simple fix, but when first faced with this type of issue, it seems like a show stopper.
Saturday, May 12, 2007
MS-Advantage's SPS to MOSS 2007 Upgrade Tips (Database Migration)
Over the last few months I have been doing quite a lot with upgrades. I got frustrated recently with Microsoft presentations stating that the database migration approach contained many manual steps (with no one from Microsoft actually willing to state what those steps were). Even the upgrade documentation says 'Repeat the restore and add database procedures for all content, search, and user profile databases'. They make it seem so simple don't they? I had previously found that I could upgrade the site content, but not the profile/audience information. No matter what I did, the upgrade resulted in me bashing my head up against a wall. Well in the week off between finishing up with SDM and starting a contract with DiData, I spent a lot of hours actually getting this to work. The information below has taken a lot of blood, sweat and tears. So rather than you 'claiming it as your own', I would appreciate it if you at least give me some credit. My company (MS-Advantage Pty Ltd) is always keen to provide additional consulting services if required :-)
My tips for upgrading:
My tips for upgrading:
- Get your preconfig running early in the piece, so that you leave yourself time to cleanup orphaned objects or unused sites. The PREUPGRADESCANCONFIG.xml file should contain each definition of your custom templates. Document the unghosted pages. In most instances, you would want to Reset to Site Definition after the upgrade (otherwise you cannot take advantage of the features available in MOSS).
- Run SharePoint Configuration Analyzer, making sure you package up all of the web part cab files. Create a batch file for later installation of these web parts. The Configuration Analyzer is also useful in identifying closed web parts on pages (which should typically be deleted).
- Sort out your Account naming conventions and database naming conventions before the upgrade. For databases, I often prefix the farm name and suffix the host header. E.g. IntPrd_WSS_CONTENT_Intranet.
- Decide on whether or not you are going to configure sites with Kerberos or not. Make sure you have knowledgeable infrastructure people who know how to use the SetSpn command and to troubleshoot kerberos related issues. I find that IE 7 in particular continually re-prompts for authentication if kerberos is not setup properly (whereas IE6 seems to revert to NTLM mode).
- I prefer to do a database migration rather than an in-place upgrade or gradual upgrade. With in-place upgrade often it is difficult to clean up the old SPS installation properly (you need to stop all of the SPS services before attempting to uninstall). With the gradual upgrade, I find the documentation doesn't really cover best practices for migrating sites across (e.g. do you use stsadm -o backup, then stsadm -o restore; or do you use the export/import approach - I haven't tried the export on a SPS machine).
- Make sure that you create all of your MOSS-based custom site definitions and that they are in place before you run the upgrade. I typically just copy the OOB ones and rename them based on which template most closely matches your custom template (90% of SPS implementations just change SPSTOPIC, SPSNEWS etc because of branding/integration of navigation web parts, rather than fundamental changes to list definitions etc). If you have previously used custom templates, copy across your own webtemp??.xml file with your custom site definitions in there.
- In the 12\Config\Upgrade directory, you must create your own SPSUpgrade.xml file (I typically use SPSUpgrade
.xml). This file maps tells the upgrade process what to do with references to custom templates that it finds in the content. - Also in the 12\Config\Upgrade directory, if you have custom templates, you need to update the SiteUpgraderConfigSPS.xml file. This file typically tells the upgrade process what layout page to use with each associated template. By default, the SPS template will use the defaultLayout.aspx page, which has a different zone layout to the previous version (3 zone columns). I often find that when migrating from the SPS 2 zone structure to the 3 zone structure, the resultant upgraded page can become wider that it was previously, thus causing people with 1024x768 resolutions to scroll. To combat this, I have previously changed the mapping for the SPS template to use the welcomeLayout2.aspx page instead of the defaultLayout.aspx, as this page has the same 2 zone structure that was used in SPS 2003. All of the other custom site definitions typically use the welcomeLayout2.aspx page also.
- After creating the farm, configure base services (email, Office SharePoint Search, WSS Search). At this point you do not have any MOSS sites or SSP sites.
- At this point, do a final prescan on the SPS box and do a backup of the databases (for the migration). To prevent users from possibly changing the current SPS environment, set it to read only (I typically do this via Central Administration Configure site quotas and locks from the Virtual Server List page Manage site collection quotas and locks, then select the 'Adding content prevented' radio button.
- Switch back to the MOSS environment and create the MOSS web application. Specify a dummy database name. I usually give it a host header also. E.g. devintranet.
- Restore the _SITE, _PROF and _SERV databases (I typically restore these with different names to match the new MOSS database naming convention. The _PROF becomes the _DB database and the _SERV becomes the _SEARCH_DB database). Set the database security on the _SITE database to match the security that has been applied to the dummy database you created (farm account should have db_owner access to the database). The server farm account should have db_owner access to the restored _DB and _SEARCH_DB databases.
- To upgrade the content database, I recommend doing it from the command line (web interface may timeout if the database is large). First, detach the dummy database from the MOSS web application. Do this with the command "stsadm –o deletecontentdb –url http://devintranet –databasename IntDev_DUMMYDB_DevIntranet". Then attach (and upgrade) the restored _SITE database with the command "stsadm –o addcontentdb –url http://devintranet –databasename IntDev_WSS_CONTENT_DevIntranet"
- THIS PART IS CRITICAL - Create the new mysite host with the command stsadm -o createweb -url http://devintranet/userprofile -sitetemplate SPSMSITEHOST -title "MySite Host" (I use the syntax 'userprofile' as this is used in the URL when displaying people's public my sites. Private my sites will remain as /personal/...)
- Run the previously created batch file (from SCA) to install each of the web parts.
- Create the SSP web application (just through 'Create or extend web application'). I typically set this up with port 11000 and give it a host header name. E.g. intdevssp1.
- THIS PART IS CRITICAL - You need to perform a restore of the SSP site to capture and upgrade the profile/audience information. This must be done from the command line. The syntax is "stsadm -o restoressp -title SharedServices1 -url http://intdevssp1:11000 -ssplogin "domain\svc-spsspintdevssp1" -mysiteurl http://devintranet/userprofile -indexserver myindexservername -indexlocation "E:\Program Files\Microsoft Office Servers\12.0\Data\Office Server\Applications" -sspdatabaseserver mydbserver -sspdatabasename IntDev_IntDevSSP1_DB -ssppassword “myssppassword” -searchdatabaseserver mydbserver -searchdatabasename IntDev_IntDevSSP1_Search_DB -ssl no
A warning message usually appears with the message “Could not find stored procedure 'dbo.proc_MSS_PropagationGetQueryServers'”. I have not worked this out as yet, but the upgrade appears to have worked successfully at this point. - Within Central Admin, apply a web application policy for a 'MOSS Admins' group (I typically do this because you can only specify an individual for site collection administrators).
- By default, the account used to setup the farm will have access to the Shared Services Provider site when it is created. Although adding the MOSS Administrators group to the web application policy gives those users the right to access the site, certain activities such as modifying the user profile schema is still secured. To fix this problem, login to the SSP site using the administrator account that created the farm. Select the 'Personalization services permissions' hyperlink in the SSP site and add the MOSS Admins group. Give the MOSS Admins group full access (i.e. 'Create personal site', 'Use personal features', 'Manage user profiles', 'Manage audiences', 'Manage permissions' and 'Manage usage analytics' rights).
- After an upgrade, you may notice a synchronisation issue being logged in the Windows Event Log. To fix this, from the command prompt, type:
Stsadm –o sync –DeleteOldDatabases 0 - There is a known bug with upgrades and that is that new users get an error when trying to create their my site. To fix this issue, navigate to Central Administration Application Management, and enable self service site creation. Add the application pool account associated with the my site host to the local administrators group. Perform an IIS reset.
- TIP. I often find that previously in SPS/WSS, business units had to move their collaborative content into a team site (because of the more granular security). I have found that many customers often want to put these two previously segregated components back together (e.g. have one HR site that contains both published information and collaborative workspaces). To do this, you must use the stsadm -export and -import commands. I have found that if you use the minimal amount of arguments to these commands, documents for instance sometimes don't get exported (and are therefore subsequently missing following the import). The most reliable syntax I have found for the export is "stsadm -o export -url http://devintranet/sites/hr -filename hr.bak -includeusersecurity -versions 4". For the import, the most reliable syntax is "stsadm -o import -url "http://devintranet/Departments/Corporate Services/HR" -filename hr.bak -includeusersecurity -updateversions 2"
- TIP. The upgrade process tries to fix and remap every bucket web instance that it finds (i.e. C1, C2 etc). Often however, if you have hardcoded links in content, these will not be detected by the upgrade. To address this, configure the search engine (i.e. do a full index crawl), then do searches for 'C1', 'C2' etc to find these hard-coded links.
I hope these tips/instructions save you the pain that I went through.
South East Water Goes Live
When I left SDM a few weeks ago, I had just finished developing South East Water's public web site using MOSS (only content needed to be added). Even after I had finished SDM, I was still testing it remotely and providing feedback (we had a wierd deployment issue, which was resolved with the help of Angus Logan). Well it finally went live this week. Check it out at www.sewl.com.au. Thanks to William Cornwill (CodeJedi) who also worked with me on this project.
Subscribe to:
Posts (Atom)
