Master page cannot be loaded…

There is an interesting bug in SharePoint Designer: sometimes when you browse SharePoint pages in the design view of the SharePoint Designer, you will see an error stating that the master page cannot be loaded. At that point you get presented with two options: either attach a different master page or work in the code view. Neither of those options actually solves the problem, they just allow you to work around it. I have never liked workarounds; I prefer solving the problems instead of working around them. J

With a little bit research I have found that the reason why my custom master page cannot be displayed in SharePoint Designer is that the default master page (default.master) has been checked out. Once I have checked in the master page, SharePoint Designer went back to displaying my master pages in the design view.

Please note that sometimes SharePoint Designer locks up the pages if you have checked out the page and then closed the application without checking in the page. So, you will have to check out the page and then check it back in. Sometimes, the only way to do is that is through the Site Content and Structure part of the SharePoint site.



Related resources:

Issue with migrating custom list templates

If you're trying to export custom list template (with or without content) from one SharePoint collection or farm to the other, you might notice that your recently imported list template does not appear on the "Create Page" page of that site, which means that you cannot use the new template to create new list. This issue appears to be caused by the fact that your list definition ID of the new custom template is different

The workaround is to:

  • After you have imported your template, go to List templates section (Site Actions >> Site Settings >> List Templates) and write down the Title and Feature ID fields.
  • Now create new empty custom list and call it EmptyList
  • Create new list template based on the EmptyList (Settings >> List Settings >> Save List as Template)
  • Now when you try to create new list, you will see EmptyList on the list gallery. If you hover your mouse over the EmptyList item in the list gallery, your browser's status bar should display the URL similar to:
    http://SHAREPOINT/_layouts/new.aspx?NewPageFilename=EmptyList%2Estp&FeatureId={00bfea22-ec85-4403-972d-ebe475780216 }&ListTemplate=100
  • Replace the NewPageFilename and FeatureId entries with the values noted at the step one. Your new URL will look something like that:
    http://SHAREPOINT/_layouts/new.aspx?NewPageFilename=ImportedListName%2Estp&FeatureId={00bfea71-de22-43b2-a848-c05709900100}&ListTemplate=100
  • Copy modified URL to the address bar and hit Enter
  • Configure the name and the description of the list and hit Create. Your newly created list will be based on the imported list template.

Be cautious of the automatic web part installers

If one beautiful morning your SharePoint designers complain that they now get "The server sent a response which SharePoint Designer could not parse…" error when they try to edit SharePoint page or page layout, and/or your SharePoint developers all of the sudden are unable to access any of the SharePoint services under _vti_bin folder (like _vti_bin/lists.asmx), then check your web.config file. The tags in <httpHandlers> section in web.config file are probably out of order.

<remove verb="*" path="*.asmx" /> tag needs to be posted before any of the <add > tags in <httpHandlers> section in web.config file, otherwise the SharePoint web services path configuration breaks.

In our case this issue was caused by the web part install that incorrectly modified web.config file to configure AJAX in SharePoint. I guess the lesson is always be cautious of the automatic web part installers J

Microsoft and the Antitrust Browser...A Decade in the Making

It seems just like yesterday that some government was telling Microsoft that the bundling of Internet Explorer with Windows was unbecoming of an industry leader, because it screwed other web browsers out of market share.

The European Union has made a decision stating Microsoft cannot bundle Internet Explorer with Windows anymore, if they want to sell in any European countries.  This decision was the result of Opera Software ASA, the people behind the Opera browser.  The complaints are two-fold.

  1. Market share is nearly seized completely by IE because it comes preinstalled with Windows, which is the dominant operating system.
  2. Because the majority of browsers are IE, websites need to conform to IE’s html rendering which is “non-standard”.

I’d agree with the first statement, but I find it bogus.  Regardless of whether or not IE has dominant market share, you still need a browser.  How would you get your hands on the installation files for the new browser?  Certainly not by downloading it from the internet…  You can get the software from the store.  Not likely.  That just means one more piece of software to worry about.  You can have the browser company mail it to you.  Is Firefox a company?  Do they have offices?  Seriously?  WTF?  Oooh, or maybe Microsoft can have a basic version of a web browser, that all it does is go to one specific site.  The site then has a list of all available web browsers on the market, which you can then download.  I’m actually at a loss to say for once.

With regards to the second point, Internet Explorer certainly does not have a great track record for sticking to HTML standards.  But I have to say Firefox, Opera, Safari, etc, don’t conform either.  None of them conform to the HTML standards completely.  With that being said, Internet Explorer 8 is supposed to be ACID 2 compliant, meaning it is compliant at least as much as everyone else.  In other words, it shows the face:

AcidTest2[1]

I’m going to keep an eye out for news from the EU, because I suspect they will overturn the ruling in some way or another.  Some people say Internet Explorer is only to be used to download Firefox.  Now that it’s not there, how the hell do you plan on downloading Firefox, eh?

SharePoint and Vista: a problem with “Explorer View” and “Create list from spreadsheet”

We have recently encountered a problem with some of the SharePoint (WSS or MOSS) features not working properly in Windows Vista:

  • When users attempt to display a document library in the Explorer view within the web application that uses Kerberos authentication, nothing happens: Explorer view never comes up and no errors displayed either
  • Or, when users attempt to display a document library within the web application that uses NTLM authentication, they get "Your client does not support opening this list with Windows Explorer" error;
  • When users attempt to create list from Excel spreadsheet they get "Method 'Post' of object 'IOWSPostData' failed" error

After a lot of research and many unsuccessful attempts to fix these problems using various solutions found on the web, I have finally able to find a workaround that have worked on Windows Vista 32-bit.

Solutions that did not work in our situation:

  • Installing and enabling WebDav on IIS 7
  • Installing Desktop Experience on Windows 2008 server 64 bit
  • Modifying EXPTOOWS.XLA macro file to force using a different version number
  • Etc…

The workaround that worked:

  • Install hotfix KB945015 on the client machine to fix a bug caused by an extra forward slash mark (/)appended to the query path of a WebDAV PROPFIND request
  • Install Web folder hotfix on the client machine to get Vista map a drive to a web location on SharePoint
  • Map a "Web Network Location" on your PC to the root of the SharePoint site in question and ensure that you save the credentials

This workaround only worked for Windows Vista 32-bit.



Related resources:

On with the new… server that is

As a part of our continuing commitment to the server/service improvements and never-ending technological progress, we have moved ObjectSharp blogs to the new (better, faster, and prettier) server. ObjectSharp has always demonstrated a leadership in adopting cutting-edge technologies, so moving our blogs to the emerging cloud services only makes sense for us. For now, we use Amazon Elastic Compute Cloud running Windows, at least until Microsoft Windows Azure cloud services mature. More updates and upgrades coming soon. Stay tuned…

Please update your favorites and RSS feeds with the new URL: http://blogs.objectsharp.com

How to change the URL for SharePoint Central Administration site

I have been working on configuring high availability for SharePoint servers (MOSS or WSS), and for a little while I wasn't able to figure out the way to modify the URL for SharePoint Central Administration site. So, basically you extend the Central Administration web application (using GUI or psconfig command) to run on multiple servers, and when you click on SharePoint Central Administration icon you're still redirected to a specific SharePoint server instead of been redirected to the Load Balancing URL. Anyway, as it turns out the URL has to be changed via registry on all SharePoint servers. Weird?!

To change the URL for SharePoint Central Administration URL:

  • Open Registry editor
  • Backup the registry before making any changes!!!
  • Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS and change the value of CentralAdministrationURL to whatever you want to be


Related resources:

How to change the port number for SharePoint Central Administration site

To change a port number that SharePoint Central Administration site is running on:

  • Open Command Prompt
  • Go to BIN folder in SharePoint install directory (by default, it would be "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN")
  • To get the port number that Central Administration site is currently running on, type

    stsadm.exe -o getadminport
  • To change a port number that SharePoint Central Administration site is using, type

    stsadm.exe -o setadminport -port <portnumber>

SharePoint: No easy way to deny access

For a sophisticated web application, SharePoint (WSS or MOSS) is missing a feature as simple as Deny access (Deny Read, Deny Write, Deny All). To deny access to the SharePoint for single user or a group of users, you modify Policy for Web Application in SharePoint Central Administration:

  • Open SharePoint Central Administration
  • Click on Application Management
  • Then, under Application security, click on Policy for Web Application
  • Select correct web application in the drop down
  • Click on Add Users
  • Select web application and the zone. Click Next
  • Enter the username or security group. Select Deny Write or Deny All and click on Finish

Note: This will deny access to the whole web application in SharePoint! There is no way to deny access to a specific SharePoint item (site, list, document library and so on)

Hopefully Microsoft will fix this weakness in the next service pack or so…

SharePoint bug: extending web application breaks the backup process

There appears to be a bug in SharePoint (WSS or MOSS) that breaks the backup process after extending a web application. If you need to add host headers or load balancing URL to your SharePoint web application, the only way to do that is to extend your web application (SharePoint Central Administration >> Application Management >> Create or extend Web application >> Extend an existing Web application). Even though extending web application allows you to add load balancing URL and host headers, for some reason, it breaks the backup for all site collections and sites that use that web application. You could still backup SharePoint site collection using stsadm.exe command (stsadm.exe –o backup –url http://damagedWebApp/ -filename backup_damaged_webapp.bak), but built-in SharePoint backup through Central Administration wouldn't work. You will start receiving an error (Error: Object SharePoint - 80 failed in event OnPrepareBackup. For more information, see the error log located in the backup directory. KeyNotFoundException: The given key was not present in the dictionary) every time you attempt to backup modified web application using Central Administration website.

To get backup process working again you will have to perform the following steps:

  1. Backup your web application database through Microsoft SQL Server Management Studio!!!
  2. Detach the content database from the web application:
    1. Go to SharePoint Central Administration >> Application Management >> Content Databases
    2. Make sure to select damaged web application form the drop down list, otherwise you will messing with the wrong web application
    3. Click on the content database used by damaged web application
    4. Check "Remove content database" and click OK (ignore the warning). Removing the content database does not delete the database; it only removes the association of the database with the Web application. This action is analogous to detaching a database in SQL Server in that the content of the database remains intact.
  3. Delete the web application (remove SharePoint from it):
    1. Go to SharePoint Central Administration >> Application Management >> Delete Web Application
    2. Make sure to select damaged web application form the drop down list
    3. Leave "Delete Content Databases" and "Delete IIS Websites" options set to "No". You can always remove them later, right now we are only interested in removing SharePoint references to the damaged web application
  4. Create a new web application with the appropriate settings for host header, load balancing URL and so on:
    1. Go to SharePoint Central Administration >> Application Management >> Create or extend Web application >> Create new Web application
    2. Configure new web application settings. Don't forget host headers, new website and port settings, and load balancing URL (as needed) and click OK
  5. Remove content database of the newly created web application by running
    stsadm.exe -o deletecontentdb -url http://newwebapplication:port -databasename NEW_WEBAPP_DB
    Go to http://technet.microsoft.com/en-us/library/cc262449.aspx for more information on deletecontentdb operation of stsadm.exe command
  6. Attach the existing database to the new web application by running
    stsadm.exe -o addcontentdb -url http://newwebapplication:port -databasename OLD_WEBAPP_DB
    Go to http://technet.microsoft.com/en-us/library/cc263422.aspx for more information on addcontentdb operation of stsadm.exe command
  7. Make sure that host headers in IIS as well as Alternate Access Mapping is set properly and try running the full SharePoint backup again through Central Administration.

After those steps you will probably also have to configure search server setting for your content database (SharePoint Central Administration >> Application Management >> Content Databases >> Select Search Server from drop-down list) and get full crawl running to make sure that your search is up-to-date and working properly.

Now that your backup is running again, it should safe to remove:

  • the database that was created with new web application (see Step 5 above)
  • the website used by damaged web application (assuming you don't need this website for anything else)

 



Related resources: