Problems with Vista and my Belkin f5d9630-4 modem

I got a new laptop, and it came with Vista. To be honest, I didn’t really want Vista, but it’s being pushed in a big way – XP laptops are pretty rare already. (What I REALLY wanted was a Linux laptop, but that’s another matter).

Unfortunately, on firing up the machine and connecting it to my wireless hub, it could only see parts of the web. With my work laptop, sat right next to it, I could see any site that I tried to look at, but my new Vista laptop couldn’t – it couldn’t find microsoft sites, McAfee, Mozilla.com, cNet.com, etc.. But it could find google (and other sites) right away.

So, I tried pinging these sites – and got a response. But I couldn’t ever get a web page back. Curious.

I’ve seen this before, so I tried changing the MTU (Maximum Transfer Unit) settings for my machine – only to discover that they’ve moved in Vista. So, I found a little application to change the settings. I restarted, and it continued to not work.

Curious. So I took my laptop to work, and tried the problem sites there. Over my work connection, I could see whatever sites I wanted to. This upped it to Curious and Frustrating – it was some sort of inter-relationship between Vista, and my connection at home.

Thus, I contacted Belkin support. They took a wee while over replying, but I received a response, the guts of which is below:

To get the issue resolved, we suggest you to change the MTU on the Vista computer.The first method to set the MTU is using DrTCP (http://www.dslreports/drtcp). You will need to run DrTCP as Administrator (right click the executable and select `Run as administrator`), otherwise it will not work. The other tricky thing is that the names of the network interface are shown a bit cryptic – see the screenshot – but you should be able to identify them. As usual, enter the MTU value, click Save and click Exit. After making the change, you will need to reboot the PC.

When the PC has rebooted, you can check if the MTU is set correctly by going to a command prompt and issuing the command: netsh interface ipv4 show interfaces, which you can abbreviate to netsh int ip show int, as the screenshot shows. This will list all the network interfaces with their MTU`s in a readable way. (In case you were wondering, the MTU shown for the Loopback interface is a dummy value of 2^32-1 – or 32 binary 1`s).

You can also set the MTU using the command line, for that purpose open the command prompt as administrator (right click it and select `Run as administrator`), and issue the command: netsh int ip set interface “9” mtu=1400, where the 9 is the number of the interface for the previous screenshot (be sure to include the quotes) and you can change the MTU to any value desired. The change is effective immediately but will not survive a reboot. To make it permanent, repeat the command and append “store=persistent” to it: netsh int ip set interface “9” mtu=1400 store=persistent.

If you only run the last command and not the one without the store= option, you`ll need to reboot for the new MTU to take effect.

To test if the MTU is effective, ping the router with the -f and -l options: the maximum size of the ping packet should be 28 less than the MTU. In this example ping 192.168.2.1 -f -l 1372 should give a reply, ping 192.168.2.1 -f -l 1373 should give the message that fragmentation is needed but the DF flag is set.

“Okay”, I thought, “I’ve tried the MTU settings and that didn’t work. But I’ll try their way anyway”. I used the DrTCP application, followed their instructions – and the problem continued. Arse. Finally, as a last gasp, I used the command line instructions they’d also given and success! The MTU setting changes worked this time, although why they didn’t when I’d changed them both times before is a mystery.

Of course, by this time I’d gotten so annoyed with it all that I’d tried a reinstall of Vista, so I’ll have to reinstall all of the stuff it came with. This isn’t as daft as it might seem – I’ve had a similar problem to this before, but it turned out that it was a problem applying Windows 2000 SP4, and that I had to reinstall the service pack to fix it.

Oh well, I prefer a clean system anyway.

Anyway, kudos to Belkin UK tech support. I was impressed.

Problems with Vista and my Belkin f5d9630-4 modem

Content Query Web Parts and Site Categories

Here’s a thought – wouldn’t it be cool to have a way of getting content from Sites in a Site Collection, but filtered by their category data?

At the moment, the Content Query Web Part gives you 3 options as to what sites it queries:

  1. A specific site
  2. This site and its children
  3. All sites in the collection

Wouldn’t it be great, though, to form that list of target sites based on a category? For example, in a big company it may have a number of divisions, each with their own ‘Finance’ department. A content query web part that could show content from all the ‘Finance’ category sites across the organisation would be very cool.

Can’t see a way of doing it at the moment though. I suppose I could write my own web-part – but the Content Query Web Part gives you so much already, I don’t want to have to replicate that.

Content Query Web Parts and Site Categories

Master Pages for Admin and global pages

One of the pains about master pages in SharePoint is that when you set one for a site, it doesn’t apply to the admin pages. This can lead to a, um, interesting difference in appearance.

I started looking into overcoming this. Obviously, there is a fairly straight-forward approach – modify the application.master. Ouch. Then, any changes to design in one file have to be replicated elsewhere, with one file in the Master Page Gallery, and one on the file system.

Alternatively, I found a neat solution at David’s blog. This uses an HTTP Module to reset the master page for any pages looking for application.master.

But after following his instructions, my admin pages wouldn’t work. I just got the error page ‘Unknown Error’.

Digging into the logs, I found what was going on – there were 2 content placeholders that the application.master uses which weren’t on my ‘normal’ master page. Make sure you add place holders for:

<asp:ContentPlaceHolder id="PlaceHolderPageDescriptionRowAttr" runat="server"/>
<asp:ContentPlaceHolder id="PlaceHolderPageDescriptionRowAttr2" runat="server"/>

The full list of placeholders used in both files is:

  • PlaceHolderPageTitle
  • PlaceHolderAdditionalPageHead
  • PlaceHolderBodyAreaClass
  • PlaceHolderBodyLeftBorder
  • PlaceHolderBodyRightMargin
  • PlaceHolderCalendarNavigator
  • PlaceHolderFormDigest
  • PlaceHolderGlobalNavigation
  • PlaceHolderGlobalNavigationSiteMap
  • PlaceHolderLeftActions
  • PlaceHolderLeftNavBar
  • PlaceHolderLeftNavBarBorder
  • PlaceHolderLeftNavBarDataSource
  • PlaceHolderLeftNavBarTop
  • PlaceHolderMain
  • PlaceHolderMiniConsole
  • PlaceHolderNavSpacer
  • PlaceHolderPageDescription
  • PlaceHolderPageImage
  • PlaceHolderPageTitleInTitleArea
  • PlaceHolderSearchArea
  • PlaceHolderSiteName
  • PlaceHolderTitleAreaClass
  • PlaceHolderTitleAreaSeparator
  • PlaceHolderTitleBreadcrumb
  • PlaceHolderTitleLeftBorder
  • PlaceHolderTitleRightMargin
  • PlaceHolderTopNavBar
  • PlaceHolderUtilityContent
  • SPNavigation
  • WSSDesignConsole
  • PlaceHolderHorizontalNav Normal master page only
  • PlaceHolderPageDescriptionRowAttr Admin master page only
  • PlaceHolderPageDescriptionRowAttr2 Admin master page only
Master Pages for Admin and global pages

The format of Dates in CAML

So, a colleague asked me about what format dates should be put into the where clause of a CAML query as. I’d had a lot of problems finding this out myself, and ultimately I found that a .ToString(“u”) on a DateTime object did the trick. The produces a time of the form 2006-04-17 21:29:09Z

For example, using a StringBuilder to create my CAML query (for my SPQuery object), this might look like:

caml.Append("<Leq>");
caml.Append("<FieldRef Name='MyDueDate'/>");
caml.Append("<Value Type='DateTime'>");
caml.Append(System.DateTime.Today.ToString("u"));
caml.Append("</Value>");
caml.Append("</Leq>");

(This query contains the date contained in the MyDueDate column with the current date and time).

The format of Dates in CAML

SharePoint Licensing

Found on Cornelius Van Dyk’s blog – SharePoint Licensing Information. Interesting stuff. No, wait, the other thing – tedious. Still, quite how you license your Internet facing WCM site did strike me as an interesting issue, especially as one of my colleagues kept going on about having external sites as ‘read only’. What, no feedback forms? Comments? Survey submissions? Well, it seems that the definition is one of accessibility – so long as everyone can access these features, you can use an Internet access license. I wondered how they’d deal with that.

(For content accessible to employees/partners only, I presume it’d be a normal client access license).

Update: See the Logical Architecture Model: Corporate Deployment document for details on this, and dealing with partners. That’s quite interesting – you can host partners sites on Internet or Intranet farms.

SharePoint Licensing

No Theme Inheritance in SharePoint

Bit of a shocker – no inheritance of themes through a site hierarchy in WSS3. There is of Master Pages, but not of themes.

Given that you can do all of what you do with Master Pages it does make me wonder – what are Themes for?

Updated: Heather Solomon has looked at it, and her suggestion is to just put your styles in the Master page.

Updated again: Or just use the Alternate CSS URL for your site.

No Theme Inheritance in SharePoint