Tuesday, 24 March 2009

Can't sign in to SharePoint with IE8 or IE7 - 0xc000006d errors

If like me you have SharePoint 2007 and Windows Server 2008 installed on the same computer for development purposes, you may find that you have problems signing into your SharePoint site once Internet Explorer 8 has been installed.

Update: This also appears to be happening on IE7 after the installation of recent Windows Update KB963027 - Thanks Virinder for the update.

The following errors appear in the Security Event logs:

An account failed to log on.

Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0

Logon Type: 3

Account For Which Logon Failed:
Security ID: NULL SID
Account Name: phil
Account Domain: PORTAL

Failure Information:
Failure Reason: An Error occured during Logon.
Status: 0xc000006d
Sub Status: 0x0

Process Information:
Caller Process ID: 0x0
Caller Process Name: -

Network Information:
Workstation Name: PACSERVER
Source Network Address:
Source Port: 57620

Detailed Authentication Information:
Logon Process:
Authentication Package: NTLM
Transited Services: -
Package Name (NTLM only): -
Key Length: 0

The sign in request seemed to be trying to log me on using a domain name called PORTAL, which doesn't exist but is the NetBIOS name of my SharePoint site URL - portal.pacdomain.local. When I tried signing on using the DOMAINNAME\Username format, the logon failed with the same message in the event logs.

To resolve the issue, I followed the steps documented in the following article - http://support.microsoft.com/kb/956158/en-us, which seems completely unrelated to the issue I was having as it references a problem when using SQL Server 2008 Reporting Services.

Update: This issue is also discussed in the following Microsoft article - http://support.microsoft.com/default.aspx?scid=kb;en-us;896861

Thursday, 12 March 2009

Storing Site Metadata - The Easy Way

There are many scenarios where you might want to store metadata on a site - for example, if you are creating project team sites, you might want to attach the project reference number, manager, RAG status, etc. If you are into development, you can do this by writing to the site property bag, but if you're not, the easiest way I have found is to create a custom list on the site and add your site information to the first item in the list.

This is very easy to do, and of course users will be able to add the information using the standard list edit form in the UI and you can assign appropriate permissions for specific people to add this information to the site.

There is one request I have had from users though, and that is to show the metadata in a Web Part on the home page of each site and allow new sites to be created from a template which also show the metadata on the home page by default. Whilst not the biggest fan of SharePoint Designer, it does allow you to do this quite easily:

1. Create your list on the site (I have called it Project Information for this example)

2. Create the columns to contain the metadata that you wish to store

3. Add at least one item to the list - I usually populate it by populating the Title column value with "Complete these details for this project by clicking "Edit Project Information" in the left-hand navigation" and creating a link to the EditForm.aspx file in the Quick Launch.

4. Create a new Web Part page on the site as a temporary home for your Web Part.

5. Edit the Web Part page in SharePoint Designer, click Insert > SharePoint Controls > Custom List Form.

6. Choose your custom list in the drop-down box, select the "Display Item Form" and untick the standard toolbar option.

7. Delete any unwanted cells and rows from the table, and get it looking how you want it.

8. Save the page (this will mark the page as customised, but you are deleting later anyway).

9. Go to the Web Part page in the browser and export the Web Part to a file.

10. Go to the default.aspx file on the site and import the Web Part from the saved file.

11. Delete the temporary Web Part page (this was created to avoid you having to edit the default.aspx page - thus, marking it as a customised page).

12. Save the site as a template, remembering to tick the "Include Content" option so that the first item in the custom list is stored in the template.

13. Create a new site using the template - the site metadata will now be present on the home page.