Friday, 30 October 2009

0x81070215 Means Dodgy List

After some more hacking around with a custom list SharePoint gave me this error code: 0x81070215

Basically I’d mangled a list definition while an earlier version of the list still existed. The easy solution in my case (dev) was to simply fire up SharePoint Manager 2007 and use the UI to delete the offending list (stsadm –o forcedeletelist –url http://spsite would have probably done the same thing). In a more serious environment, you’d probably need to redeploy the list bits as they were when the list was created.

Control template "ListForm" does not exist

I have no idea how I caused ListForm not to exist but after some clumsy tinkering with a custom schema.xml file, the main section of NewForm.aspx page was coming up blank and the AllItems.aspx page for all lists in all sites across my dev farm refused to render the normal menu.

The SharePoint log file was telling me:

Control template "ListForm" does not exist

Examining a list’s NewForm.aspx file in SharePoint Designer (which of course makes me feel dirty all over) you’ll note it holds a ListFormWebpart. “Control template” would further point me to the _controltemplates virtual directory—mapped to \12\TEMPLATE\CONTROLTEMPLATES, but this directory doesn’t contain a ListForm.ascx or ListFormWebpart.ascx file.

Thankfully the Application event log entry was more precise:

Load control template file /_controltemplates/DefaultTemplates.ascx failed: The file '/_controltemplates/DefaultTemplates.ascx' does not exist.

A quick check of \12\TEMPLATE\CONTROLTEMPLATES and of course DefaultTemplates.ascx was nowhere to be found. Copy/paste from a functional server and we’re back in business. Now to figure how what caused it to be deleted in the first place…

Wednesday, 28 October 2009

Activating a feature containing a content type generated from Andrew Connell's stsadm commands generates 100% CPU load

I've used AC's WCM Custom Commands for STSADM successfully in the past and they're extremely handy. In short, I create my site columns and content types in the SharePoint UI and then run Andrew's GenSiteColumnsXml and GenContentTypesXml to dump the XML required for incorporation in a feature. Today I hit a wee snag when attempting to activate a feature containing fields and content types generated from these commands: the operation wouldn't complete until terminated forcefully and the CPU was meanwhile running at 100% (infinite loop anyone?).

Luckily JoeB came across the same problem in the past and was kind enough to post his fix in the comments on Andrew's blog (although I also noticed another commenter noted the issue in production after implementing JoeB's fix...). Andrew says these commands were built using the 80-20 rule: they'll get you 80% of the way there and you're on for the rest. Fair enough—the commands are extremely handy and I reckon they go well beyond the 80% mark. That said, these are some of the things I fix up after generating the output; I'll list JoeB's fix here too:

Fields

This makes updating the feature easier:

  • Add the DisplaceOnUpgrade="TRUE" attribute

I've read these aren't meant to be included explicitly but the documentation, useful as it is, indicates they're optional anyway:

  • Remove the SourceId attribute
  • Remove the StaticName attribute

These can go without any consequence I've noticed:

  • Remove the Version attribute
  • Remove the Required="FALSE" attribute

These seem to come out if you muck around with the fields too much in the UI:

  • Remove the PITarget attribute
  • Remove the PrimaryPITarget attribute
  • Remove the PIAttribute
  • Remove the PrimaryPIAttribute
  • Remove the Aggregation attribute
  • Remove the Node attribute
  • Remove the ContentType field altogether (SharePoint Manager 2007 indicates it's added automatically even if not specified)

Content Types

JoeB's fix to the 100% CPU issue:

  • Add NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms" to the XmlDocument element

(Note you may also be able to remove the XmlDocuments node altogether).

Friday, 23 October 2009

No SharePoint MVPs in Western Australia

This is an unfortunate situation… there are so many top-notch SharePoint guys (and gals) working proactively in the community and doing great work in WA with major clients. That said, with only five SharePoint MVPs in Australia I’d say we’re under-represented as a country!

You can nominate yourself or someone else here: https://mvp.support.microsoft.com/gp/mvpnominate

Western Australia SharePoint MVPs

Tuesday, 20 October 2009

Running ISO Recorder on Windows Server 2008 x64

When trying to copy a DVD to an image using ISO Recorder v3.1 on a Windows Server 2008 x64 machine, the Next and Finish buttons were greyed out despite correctly selecting the From and To locations. As I have to run Nero Express Essentials as an admin (right-click, Run as administrator), I tried setting the ShellExec.exe file below C:\Program Files\Alex Feinman\ISO Recorder to run as admin on the Compatibility tab to accomplish the same thing. When that didn’t work, I found I had to click the Show settings for all users and select Run this program as an administrator on the second Compatibility for all users window.

This doesn't seem to work for all functions; for example, attempting to burn the created ISO to disk fails to populate the Recorder drop down with the local optical drive and I can't complete the operation.

In general I must say ISO Recorder looks like it's going to do the job I want it for quite nicely. I created an image from a DVD by right-clicking on the DVD drive icon in Windows Explorer and it popped an 1.7GB .iso out the other end in a few minutes. I've burned ISOs with Nero in the past but can't seem to find the right settings on the version I'm using currently (I'm lumped with .nrg files). ISO Recorder hits the nail on the head so I'm sticking with it ;-)

Tuesday, 13 October 2009

Approval workflows: approval by any approver

Configuring an approval workflow to request approval from a group of approvers and deem the workflow complete after any single person has completed their approval task is trivial but it's not that obvious. I certainly missed it on my first pass through today!

The Assign tasks to radio button options on the workflow customisation page focuses on the parallel versus serial distinction. If you've got multiple people configured as approvers, you're either assigning tasks to everyone in the list or you're assigning tasks sequentially to everyone in the list; in both cases every approver has to complete their task before the workflow is deemed complete.

In the past, we've noticed a behaviour where approving a page doesn't seem to do anything—the page status stubbornly remains as Waiting for approval no matter how many times or how many different ways you attempt to approve the page and the fact that you’re a site collection administrator web application administrator, and farm administrator makes no difference!  (Without email configured on the server and perhaps some SSPs bits in place, as was the situation in our case, no one will ever know additional input is required unless you're checking the workflow status). In all likelihood, the root cause of this "problem" was an approval pending completion by virtue of being assigned to twenty people. Doh!

But I digress. Adding approvers to a dedicated Approvers group is the logical thing to do in most cases to simplify approver management. Instead of changing multiple workflows as employees come and go, it's much easier to manage a SharePoint group or an AD group. Selecting the approvers list is easy but how do you get the "any approver" bit happening?

The answer lies in the check box directly below the Approvers selection input field: Assign a single task to each group entered (Do not expand groups). Think about it long enough and it actually starts to make sense—only one approver needs to complete their task before the workflow is deemed complete, or to paraphrase: “assign the task to the Approvers group and no one person in particular.” This option isn't selected by default so select it and you're golden.

SharePoint Approval Workflow - Any Approver

Wednesday, 30 September 2009

Web site performance monitoring tools

Having gone through the pains of learning about web site performance and applying that understanding to a MOSS site (www.westernaustralia.com), the latest post on the SharePoint Team Blog about optimising sharepoint.microsoft.com caught my eye. I’ve been meaning to cover the performance nitty gritty from our experience for ages now but, for the moment, suffice it to say we fixed most of the problems faced by our global audience and now use a commercial performance monitoring service called Gomez to keep an eye on things. Gomez competes with the likes of Keynote if you’re in the market.

Commercial solutions like this cost a lot of money because they’re essentially distributing test agents all around the world and measuring full page load times from your site at a configurable interval. Response metrics are stored for trending analysis and comparison with other sites. Despite the cost, these tools are worth the money if you know your site is experiencing performance issues (if not the data gets boring really fast).

Firebug, YSlow, and Fiddler are great tools for analysing performance and will give you both page load time and page weight but they’re all executing from your desk; if your web server is down the hall or in the same city (or country) you may not have a clear picture of how latency is affecting your site users on the other side of the world. If you’re targeting a domestic audience that’s obviously not a problem but if you’re targeting a global user base and you’re attempting to do so with SharePoint you need to ensure everything about your site is optimised—not just just the server configuration. The SharePoint Team Blog post highlights the fact SharePoint (MOSS 2007) is not optimised for internet sites out of the box.

As the cost of these performance measurement services is prohibitive—especially in this tough economy, it’s interesting to see where the free services are going feature-wise. I mention the SharePoint Team Blog post specifically because the author cites a new tool I hadn’t yet come across: http://www.webpagetest.org/ I’ve previously evaluated Pingdom but their offering was still developing a year ago (they offer both free and paid services).

The webpagetest.org site is painful on the eyes but the data they provide at no cost is comprehensive. The site currently allows you run tests from one of three nodes (the US, UK, and New Zealand), meaning an adequate global coverage (we test westernaustralia.com from seven locations matching the site’s target markets).

The tool reports the results from a full page test, meaning the page and all of it’s supporting resources are requested, providing a realistic picture of how long it takes to load the page and all CSS/Javascript/images/XML files/Flash files/etc. Some of the freebie offering I’ve seen in the past only reported the page HTML load time, which will often be negligible.

In addition to giving you a screenshot of the page, which is often useful to compare what the world sees versus what you think they’re seeing, you get full waterfalls of data for a first visit and what they call a repeat view (a subsequent request for the same page with a primed browser cache), and an item by item optimisation checklist.

webpagetest waterfall and optimisation

I’m impressed!

Thursday, 24 September 2009

Removing the shutdown details prompt in Windows Server

If you’re anything like me, chances are you’ve got dozens of virtualised dev servers hanging around and you shut them off at the end of the day; you also have no idea what to put in the Shutdown Event Tracker Comment box. The event and comment do get written to the event log for future reference so I usually comply and specify an exact reason where applicable or with my standard comment “a” for “all good” or “a-team” or something like that!

In practice, I’m the only one using my dev environments and I’ve never had the need to remind myself why I shut down the server. The specific event is likely buried among the shut down/start up events anyway and it’s probably safe to say this feature was intended for multi-admin production environments.

The shutdown event tracker is just an extra hassle as a developer but it can be turned off:

  • Run –> gpedit.msc
  • Browse to the Local Computer Policy / Computer Configuration / Administrative Templates / System node
  • Locate and open the Display Shutdown Event Tracker policy
  • Set it to Disabled

Life = that little bit easier.

Tuesday, 25 August 2009

westernaustralia.com site re-launch on MOSS 2007

westernaustralia.com today gets a facelift on the coattails of the corporate site relaunch a few weeks back. The westernaustralia.com site is Tourism Western Australia’s premier consumer-facing web site and targets visitors seeking quality, unbiased information about Western Australia.westernaustralia.com rebrand

This is the first major visual change to the site since TWA launched WA.COM on the MOSS 2007 platform in May 2007. The site is regularly cited as an early, shining example of how far you can take custom branding and SharePoint. Under the covers, the site employs all the SharePoint tricks you’re used to: master pages, page layouts, web parts, content types, lists—you name it. The only thing we don’t make use of that might otherwise factor into a WCM site is SharePoint search and the BDC (we’ve built a custom solution for that).

The English-language sites alone delivered more than eight million page views in the last twelve months to an international audience. We currently run the site on the back of a single Windows 2003 x86 web front end (which also hosts the tourism.wa.gov.au site as a separate web app) and SQL Server 2005 database server shared by all of our MOSS-based web sites. Site traffic is additionally accelerated by Akamai and cached by regional Akamai nodes to ensure visitors can access the site quickly and reliably from all over the world.

The new changes are part of an interim visual shift as Marketing prepare for a new brand launch later this year. Apart from the look and feel, which was aimed at reducing clutter and softening existing brand elements, the site is moving towards dynamic (i.e. social) content (see the twitter feed!) and the home page in particular has been positioned to display fresh content like events and deals.

Want more? For some more examples of the heavily branded sites we’ve rolled out on the MOSS platform over the last year, check out the side bar on this page (“Some of the MOSS sites I’ve worked on”) and watch the videos (1, 2).

Disclaimer: I’m a contractor working at TWA. Mediawhole is not directly affiliated in any way with the agency or the web sites; when I say “we”, I mean the royal We.

Friday, 21 August 2009

Seeking an Experienced DBA with Strong T-SQL Skills

We’re looking for an experienced database administrator to start initially on a short term (three month) contract at Tourism WA’s Perth office. If you match this description, you do quality work, and you’re not a cocky git, please get in touch asap: info@mediawhole.com.

Required Personal Skills

  • The ability to work independently with initiative and self-drive
  • Excellent interpersonal skills
  • Excellent verbal and written communication skills
  • A sense of humour

Required Technical Skills

  • Practical experience writing Transact SQL scripts and applying relational database concepts
  • Practical experience installing, maintaining and migrating SQL Server 2000, 2005, and 2008 on 32 and 64-bit platforms
  • Practical experience configuring and maintaining SQL Server 2008 clusters
  • Knowledge of general performance testing and environment optimisation approaches
  • Practical experience performance tuning existing code (stored procedures, user defined functions, views, other queries)
  • Practical experience tuning indexes and configuring maintenance plans
  • Practical experience implementing a database server health monitoring and status alerting system
  • Practical experience with high availability techniques for SQL Server (mirroring, log shipping, etc.)
  • Knowledge of deploying C# CLR assemblies within SQL Server

Desirable Technical Skills

  • Experience maintaining product-specific database environments (specifically SharePoint/MOSS 2007)
  • A working understanding of network concepts as they relate to database administration (firewalls, TCP/IP, performance)
  • A working understanding of SAN and RAID technologies
  • Experience tuning storage subsystems
  • Experience installing and maintaining SQL Server Reporting Services (SSRS)
  • Experience creating and maintaining SSRS reports
  • Basic understanding of source control concepts