Thursday, February 28, 2008

WSS Configuration Wizard Error Troubleshoot

Today I thought it would be handy to have a machine kicking around that was not a MOSS install. That's right, some stock WSS. It's handy to have the both a WSS and a MOSS instance around so I can quickly compare and contrast the two. Sure enough I install all the dependencies, followed by a WSS with SP1 installation (Basic/Standalone). When I ran the SharePoint Products and Technologies Configuration Wizard though I got this crazy error! Configuration Error with SharePoint Products and Technologies Configuration Wizard

I dug through the log that gets linked to during a failed configuration (those things are HUGE) and found a stack trace that looked like:

Failed to register SharePoint services.
An exception of type System.Runtime.InteropServices.COMException was thrown.
Additional exception information: Could not access the Search service configuration database.
System.Runtime.InteropServices.COMException (0xC004122D): Could not access the Search service configuration database.

So it's looking for a Search Configuration database and can't connect...ok that's cool I guess. In the event log (Application) were a BUNCH of errors, but most of them were saying the same thing, "I can't connect to a database!". Here's a sample of an error taken out of the Event Log:

Event Type:    Error
Event Source:    Windows SharePoint Services 3 Search
Event Category:    Gatherer
Event ID:    10036
Date:        2/28/2008
Time:        2:55:47 PM
User:        N/A
Computer:    W2K3-TYLER-WSS
Description:
A database error occurred.

Source: Microsoft OLE DB Provider for SQL Server
Code: 4060 occurred 1 time(s)
Description: Cannot open database "WSS_Search_W2K3-TYLER-WSS" requested by the login. The login failed.

Context: Application 'ca49badb-d82b-42b9-aaa1-ec2c3845c1b3'

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

So I decide to poke around. I install SQL Management Studio Express (free as in beer) on the machine and try to connect to the [ServerName]\OfficeServers edition. Low to my surprise, the WSS SQL Server instance is instead installed as Microsoft##SSEE (you can see this by running the Services Snap-in Start->Run->Services.msc look for SQL Server)! That's a new one. That EE stands for SQL Server Embedded Edition. What's even worse is you can't connect to the Embedded Edition instance via [ServerName]\Microsoft##SSEE. Instead you have to connect via a named pipe. Use the following server name to connect to the SQL Instance.

\\.\pipe\mssql$microsoft##ssee\sql\query

Connecting to a SQL Server Embedded Edition using Named Pipes for server name

Finally we're getting close to an answer, essentially the Farm Accounts that need to connect to this database, NT Authority\Network Service and NT Authority\Local Service weren't added as users to this database! This is why the Configuration Wizard is kicking and screaming. It literally could not connect!

So I add the two accounts as dbo (dbowner) to the database instance that the event log was kicking and screaming about trying to connect too. Then we run the configuration wizard again and shazzam, the configuration wizard finished successfully. I guess all those log files actually have some useful information in them after all.

Adding NT Authority\Network Service and Local Service accounts to the Search UsersConfiguration Successful

Hope this helps if you end up with a similar error.

Best,
Tyler

WSS 3.0 vs Moss Standard vs Moss Enterprise

You're not alone if you find yourself scratching your head when it comes time to comparing WSS vs MOSS Standard vs MOSS Enterprise. Often when we're in the design phase of some implementation and we're talking about leveraging a MOSS feature there always seems to be a pause while someone's asks: "Is that feature  in WSS, or is it in MOSS? Is it only in MOSS Enterprise? Does the client have that?"

Luckily there's some relatively decent information that describes which features are available in which versions of SharePoint. Needless to say it's pretty important to know that the feature exists on the other side before you lob your solution over the wall.

I was surprised to find half decent Search in all versions although it does get better as you upgrade (you can supposedly index more content if you have hundreds of thousands of documents, have bigger content sources, index more types of files etc...). Enterprise most notably has the benefits of the Business Data Catalog, Info Path Forms Services, Excel Services and some other features that while are quite powerful seem a little niche to me. That could be because I'm a bit of a light weight in the BI space though.

If you do happen to get confused and wonder what it would cost a client to upgrade to various versions MOSS, Sahil Malik tries to explain MOSS costs for us in simpler speak than what you might find in a Microsoft brochure.

What surprised me the most were the costs for MOSS Enterprise, $57,670 plus $169 per CAL ($94 for Standard CAL + another $75 for an Enterprise CAL). For a lot of IT environments that 1000+ users that gets to be a SIGNIFICANT investment pretty quickly, never mind the hardware cost or the admin staff you need to keep on hand to manage a farm.

At least WSS is free (with Windows 2003) :-). I guess I'll start there and set aside a penny jar for the upgrade.

Take Care,
Tyler

Monday, February 25, 2008

There's No Reason, Active Directory Just Hates You

The Problem

Today is Monday. In addition to a morning coffee I got to start off the week with a pretty angry error when I tried to log in to the domain this morning. It looked a whole lot like:

Windows cannot connect to the domain, either because the domain controller is down or otherwise unavailable, or because your computer account was not found. Please try again later. If this message continues to appear, contact your system administrator for assistance.

Now lucky for me I actually have multiple machines and was still able to log in via another computer and start to troubleshoot this Monday special.

I decided to log in to my machine under a local administrator account account and look in the event log, sure enough I found some errors in the System category.

Event Type: Error
Event Source: NETLOGON
Event Category: None
Event ID: 3210
Date: 2/25/2008
Time: 12:06:33 PM
User: N/A
Computer: W2K3-TYLER-VIRT
Description:
This computer could not authenticate with \\[DC].[DOMAINNAME].com, a Windows domain controller for domain [DOMAINNAME], and therefore this computer might deny logon requests. This inability to authenticate might be caused by another computer on the same network using the same name or the password for this computer account is not recognized. If this message appears again, contact your system administrator.

Even more fortunate for me is that I have Domain Administrator credentials and have the ability to log in to the domain controller and poke around a bit. On the server there was this error in the event log.

Event Type: Error
Event Source: NETLOGON
Event Category: None
Event ID: 5722
Date: 2/25/2008
Time: 10:45:28 AM
User: N/A
Computer: [DC]
Description:
The session setup from the computer W2K3-TYLER-VIRT failed to authenticate. The name(s) of the account(s) referenced in the security database is W2K3-TYLER-VIRT$. The following error occurred:
Access is denied.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

I didn't really find a KB article that really fixed this nicely (which is why I'm writing this in the first place). I did however get a high level explanation of what was going on through various forums, KB's, blogs, etc...

The Explanation (attempt)

Windows clients have what's called a Secure Channel to the domain controller. It uses this to communicate with the domain controller. There is an account and a credential associated with this Secure Channel and stored on your machine AND on the domain controller. On some interval (30 days is what I found on the web) these credentials change. The domain controller also caches the OLD credential for some amount of time while it tries to propagate the new credential to your machine account. If they are changed on the domain controller and for some reason or another do not propagate to your machine then you're in trouble and you can have the error that I was getting.

You could also get this error if you have multiple machines with the same SID on the same domain or if you've been messing with the NETDOM utility in an unhealthy way.

The Fix

I was able to fix this by:

  1. Leaving the domain on my client machine. To do this, log in with a local administrator account, open up the System Properties->Computer Name->Change, and then join some fake workgroup to leave the domain. Restart your machine.
  2. Reset your machine account on the domain controller. Start ->Administrative Tools->Active Directory Users and Computers->Click on the Computers folder, right click on your computer and choose Reset Machine(below). Reseting Machine Account in Windows 2003
  3. Wait a while (I went for lunch) and then join the domain again with your local machine.

Pleasant? No. Functional again? Yes.

I wish I had a better explanation of why this happened, I have a theory but I'm still not confident enough to write it up. Hope this helps some nice folk somewhere.

Best,
Tyler

Deleting content Types in Sharepoint 2007: A troubleshoot

[Updated Nov, 13 2008]

Whenever it comes time to delete a content type, it's either a 10 second job or a multi hour why-did-I-become-a-developer endeavor. Either the content type is completely orphaned (it's not being used at all) and easy to delete, or it's used in a tonne of places, most of which will be difficult to find and the treasure hunt is on! It's of note that before a content type can be delete there can be no items in any lists that use it and it can not exist in any lists.

This blog post will cover how to delete a content type and how to troubleshoot the most common error, The content type is in use.

Deleting a Content Type

For the record, the series of steps to delete a content type are as follows:

  1. Site Actions->Site Settings.
  2. Under Galleries click Site content types.
  3. Find the content type you wish to delete and click on it.
  4. Click the Delete this site content type link.

At this point the content type will either be deleted, or you'll get an error message saying something like:

The content type is in use.

If you have errors turned on in the web.config (setting customErrors="Off" and CallStack="true") your error message may look a lot more like:

The content type is in use. at Microsoft.SharePoint.SPContentTypeCollection.DeleteFromWeb(SPContentTypeId id, String strName)
at Microsoft.SharePoint.SPContentTypeCollection.Delete(SPContentType Id id)
at Microsoft.SharePoint.SPContentType.Delete()
at Microsoft.SharePoint.ApplicationPages.ManageContentTypePage.DeleteContent Type()
at Microsoft.SharePoint.ApplicationPages.ManageContentTypePage.System.Web. UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

If you get one of the messages above then you need to get a little more creative. Your options are either digging through all the lists in the site collection and trying to figure out who's using the content type, OR running a stored procedure to determine the lists that are using the content type. I don't know about you but the latter sounds a little more time efficient.

Finding Lists/Libraries using the Content Type

The first thing we'll need is access to the content database with a SQL Client like SQL Management Studio. There's a tutorial on how to connect here.

We'll also need a tool like the SharePoint Explorer for WSS 3.0 (needs to be run on the WSS server itself) to figure out what the SiteCollection ID is.

Ok, lets get to it.

Determining the Site Collection ID of your Site Collection

  1. Run the SharePoint Explorer (SPE) on the server that's hosting the WSS site.
  2. Find your Web Application with SPE and click on the Content Databases tab to figure out what the name of the SQL Server instance hosting the content and what the name of the content database is. Sharepoint Content Database Name and SQL Instance Name
  3. Click on the Site Collection itself and grab the ID property of the site, we'll need this when we run the stored procedure. Identifying the Site Colleciton Id with Sharepoint Explorer
  4. The last thing we'll need is the ContentTypeID of the content type we want to delete, the easiest way to get this is right out of the URL when you go to delete (or edit) the content type (Site Settings->Site Content Types->Click on your content type). Here's a sample URL.
    http://w2k3-tyler-virt/_layouts/ManageContentType.aspx? ctype=0x010700037B79D2DD41C24A8F55D82FC6B71FAC&Source=http%3A%2F% 2Fw2k3%2Dtyler%2Dvirt%2F%5Flayouts%2Fmngctype%2Easpx
    In this example the Content Type ID is 0x010700037B79D2DD41C24A8F55D82FC6B71FAC.
  5. Now we open up the SQL Server Management Studio, connect to the [ServerName]\OfficeServers instance and run the following stored procedure against our sites content database (we figured this out in #2).
    [proc_ListContentTypeInUse] [SiteCollectionId], [ContentTypeId]
    Or in out case:
    [proc_ListContentTypeInUse] 'D2F8C831-4CA7-41C0-8497-82F897B61B2B', 0x010700037B79D2DD41C24A8F55D82FC6B71FAC

What you get back is a result set showing all the lists that the given ContentType is being used in. Result set from proc_ListContentTypeInUse, finding all the lists in the site collection that use a given Content Type If you go and remove the content type from all those lists you should be good to go and that pesky error message will go away.

[Updated Nov, 13 2008]
You can also run the following query which will give you the SiteId, WebId, ListId of where the content type is in use!

SELECT SiteId, sys.fn_varbintohexstr(ContentTypeId) AS ID, WebId, ListId, IsFieldId, Class
FROM ContentTypeUsage
WHERE (sys.fn_varbintohexstr(ContentTypeId) LIKE '[ContentTypeID]%')

Hope that saves someone somewhere some time.

My Very Best,
Tyler

Friday, February 22, 2008

Accessing the WSS/MOSS Content Databases

There's a myriad of information to be garnered from your WSS content databases. Although you'd very seldom want to change any of that data there's quite a few stored procedures and select statements (if you understand the table infrastructure) that can give you quite a bit if insight as to why a WSS instance is behaving a certain way.

But before you can do any of that though, you need to be able to connect to the SQL Server instance that's housing everything! Before we get started there's a couple things you'll need.

Connecting to the WSS OfficeServers Database

  1. The first thing you'll need to do is allow remote connections to the SQL Server instance. If we don't, when we try to connect to the
    [ServerName]\OfficeServers instance from another machine we'll get the following error.
    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
  2. We can enable remote connections (on the machine that's running SQL Server) by running the SQL Server Surface Configuration Wizard (usually under Start->Programs->Microsoft SQL Server 2005->Configuration Tools->SQL Server Surface Area Configuration.SQL Server Survace Area Configuration Tool
  3. From there we click Surface Area Configuration for Services and Connections, choose the SQL Server Instance that we want to enable remote connections for (OFFICESERVERS in this case) and click the Local and remote connections under Remote Connections.Allowing remote connections to WSS SQL Server OFFICESERVERS Instance
  4. Now stop and start the service for that SQL Server Instance so that you're settings can take effect.
  5. At this point we can use the SQL Server Management Studio to connect to the WSS SQL Server instance from another machine so long as your windows credential is an administrator on the SQL machine. Otherwise you'll have to connect to connect to the database the first time from the same SQL Server machine that's hosting it. The name of the WSS SQL Server instance is [ServerName]\OFFICESERVERS. Connecting to OFFICESERVERS SQL Server Instance
  6. Like I said above, it's important to note that by default the server instance only allows Windows Integrated authentication so your windows account needs to be an administrator on the machine, otherwise you're better off connecting locally from the same machine. You can enable Mix Mode authentication (which lets you use a username/password) after you connect by right clicking on the server instance clicking Propertie->Security and then clicking the SQL Server and Windows Authentication mode radio button.Enabling Mix Mode authentication in SQL Server Management Studio

I know these are pretty easy tasks for most developers but I wanted to make sure there was a starting point for a post I'm going to make in a day or so about troubleshooting deleting content types that continue to throw the error "Content Type in Use" when it's not obvious where in use it is.

Keep on keeping on,
Tyler

Saturday, February 16, 2008

Sharepoint 101: Eight terms you should understand before you start working with SharePoint 2007

SharePoint is pretty darn big. It's so big in fact that figuring out where to get started almost inevitably ends up leading you down a rabbit hole.

Now I'm not about to try to explain everything that SharePoint is in a single post. But I AM going to try to tell you (IMHO) what simple SharePoint constructs you should understand before you start developing/working on it.

SharePoint 2007 Glossary

List

Lists are the containers in which SharePoint stores data. Pretty much everything in SharePoint is stored in a list. From all the pages you create, to all the CSS in the Style Library, all the Master Pages...all stored in Lists. Lists aren't just important because they're so prevalent. A lot of SharePoint's functionality is derived from the fact that all content is stored in a list of some sort. On every list you can get all of the following:

  • RSS
  • Versioning
  • Check in/out behavior
  • Workflow
  • Alerts
  • Outlook Synchronization
  • Views (different ways of viewing data including filtering/sorting)
  • Security (can be redefined for each list)
  • Policy (how long we keep things until we delete them/kick of some process)
  • Default (and customizable) Add/Edit/View forms for adding items.

Lists store one or more types of Content Types (will be explained later). Each item that you put in a list has a content type, the default content type is Item. It's important to note that lists can store multiple kinds of Content Types, this allows a list to store many different types of data under the same roof. For instance, a realtor might use a list to store both Listings and Offers in the same SharePoint list. He would create two content types (Listings and Offers) and add them as different content types the list can store. He would break them up since Listings and Offers have different metadata requirements.

Site Column

A site column is a lot like a column you might have in a database table. It has a name and a data type. SharePoint works at pretty high levels so the data types aren't int, float, real, varchar etc.. Instead they're a lot more high level like: Picture, Rich HTML, Single Line of Text, Currency, etc... The data type of the Site Column is called the Field Type and you can create your own if you have a type which is not represented by WSS out of the box.

Content Type

A content type is a collection of Site Columns grouped together to define an item that you would like to store.

Example. Lets say I wanted to store information about vehicles and I decided to store them all in a List. First I would create a list. I would note thought that I may want to track different types of metadata about different types of vehicles though. It's kind of silly to track information about trunk space when we're talking about motorcycles, but for passenger vehicles that's probably information I might care about. I would create various Site Columns for tracking the types of meta data (horsepower, model name, weight, FWD/AWD/RWD, etc...). I would create these as Site Columns. I would then create different Content Types (Motorcycle, Passenger Vehicles, Commercial Trucks, etc...) that tie these Site Columns together and correctly describe the item I'm trying to store. Finally I would add these different Content Types to my list. When a user visits my list and clicks New, they will see all the different kinds of Content Types they can add to this list. Based on the Content Type that they choose to add they will be asked to input different information. It's important to note that each Content Type can have it's own New/Edit/Display form. This is important since most content types will use completely different fields (Site Columns) from each other.

Web Applications, Site Collection and Site

Web applications are really a IIS Web site and application pool. When you create a new Web Application in the WSS Central Administration you will have to specify either a port or host header, and application pool for the Web App to run under. At this point there's still no site though.

You actually create something that a user can use when you create a Site Collection in the web application based off of some Site Definition. A Site Collection contains a single root site which can have any amount of child sites. You can alter security, enable/disable features, anonymous access and many other things at the Site Collection level. By default these settings bubble down into the Site Collection's sub sites.

Sites are groupings of lists, workflows, pages, master pages, pages layouts and other WSS constructs that make up a usable web site.

It's important to note that a single Web Application contains one or more Site Collections which as one or more Sites which contains many Lists that have one or more Content Types (the default of which is Item) which group together multiples Site Columns to define an object for storage. Wow, what a mouthful.

Site Definition and Site Template

A Site Definition is a grouping of lists, features, settings, style sheets, themes master pages and a bunch of other stuff that define a web site. An example of a site definition would be Team Site, Publishing Site with Workflow, or Blank Site. You need to choose a site definition when you create a new Site Collection or a new Site.

A Site Template is a customized Site Definition. Site Templates are usually used to save small changes done to a Site Definition so that they can be reused over and over again. For example, lets say your company liked the Team Site Site Definition but wanted to make some small changes (add a couple lists, some default content etc...). You could save these changes as a Site Template and then create new sites based on this Site Template.

It's important to note that a Site Template is just a collection of delta's. They also run slower than a site definition and cannot be used if the Site Definition on which it's based is not on the server (because of this they're less portable than Site Definitions).

Ok that ended up being quite a bit longer than I expected. I hope that shed some light on some of the nomenclature that you'll see decorating most WSS discussions.

Good Luck,
Tyler

Sunday, February 10, 2008

Would You Recommend WSS as a Simple CMS?

WSS is the third CMS I've worked with so far. As I've gotten more competent with it I can't help but compare it to some of the other products we've worked with in the past.

I was asked again by an acquaintance what I thought about SharePoint and if I though it's implementation was a good idea where he worked. He was struggling with what so many of us have been since the release of WSS 3.0 and MOSS 2007, and he asked the cardinal blanket question.

So what do you think about SharePoint?

The answer like so many things in development was "it depends". I won't even get into the differences between WSS and MOSS that's a completely different post. But I will try to speak to what WSS is good at as a CMS. Which is (to me) what the question is really getting at for most people (they're not even thinking of IPFS, Excel Services, Enterprise Search, etc...).

What WSS is Good At

WSS is a decent Content Management System. It's free with Windows Server 2003, provides a ton of features out of the box and once you get good at branding it, you can quickly customize new types of page layouts. It's of note though that to brand WSS you need SharePoint Designer (SPD) which is NOT free.

So what are some of the notable CMS features you get for free?

  • RSS on pretty much all the content in the CMS.
  • Versioning for content, and the ability to roll back to any given version.
  • Publishing dates for content that let it go live and come down at a later date.
  • Very throughout inheritable security that can be reset at many different levels throughout the site hierarchy.
  • Good search.
  • Alerts on content (when it changes).
  • It's portable (you can migrate most site collections in less than 20 minutes).
  • Good document storage (Document/Form libraries).
  • Great integration with Office 12 (2007) products (especially Outlook).
  • Good Blog and Wiki out of the box.

There's some others but those are the big ones that come to mind. It's also important to point out that for any ONE of these items I'm positive that you could find a 3rd party product that does a better job than WSS 3.0. For instance, the Wiki Site Definition is not as scalable or as powerful as a commercial Wiki engine. I think it's the combination of all these features that makes WSS a compelling offering. If you brought together MANY 3rd party applications you might have a dynamite offering, but it would be extremely difficult to integrate them all. You'd have to enforce a consistent user interface and bring all the content together under one search. This type of integration sows the seeds for collaboration which is is the direction most CMS's are going.

What WSS is Not Good At

I'm not going to lie to you, WSS has some pointy edges. Even with the plethora of documentation and blogs out there, it's very possible to feel like you're between a rock and a hard place when things go bad. Here are some of the things that out of the box that make WSS less attractive.

  • It's heavy. WSS stands for Windows SharePoint Services...and there's a lot of them. If you do a complete WSS install we're talking about Search, Timer, Indexing...and I think there's more.. If WSS/MOSS is one thing it's heavy. Ensure you have some real hardware if you're going to install this beast, she needs a big cage.
  • Difficult to troubleshoot. I have yet to do a clean WSS install (even with SP1) and not have the event viewer light up with errors. Even after spending a lot of time troubleshooting the event lot, I've never had a WSS/MOSS instance give me more than a day without kicking and screaming about something. You're going to need really talented and resourceful Admins if you're going to run this platform successfully. Hopefully this will improve over time.
  • The WSIWYG editor out of the box is terrible. Not only does it not support image uploading but it completely breaks in Fire Fox and Safari. This makes it only really usable (out of the box) if you're in an intranet where you can shove IE down everyone's throat. Luckily there's free editors that do a better job, like this one.
  • You need the Office SharePoint Designer. WSS may be free (with Windows 2003), but branding it isn't because SPD costs money. Unlike other CMS tools you absolutely need a proprietary tool to brand a WSS/MOSS instance. Your designer/web developer is also going to need to really know html and CSS. If you do have some people who know there stuff though you can get a really nicely branded site, an example might look like this WSS site.
  • SharePoint is not great at housing web applications. There I said it. Yes you can get ASP.NET code to run in SharePoint, in fact there's a ton of ways to do it. All that being said though, it adds a lot of complexity to how your developers develop, deploy and maintain their code. At the end of the day you're often better off writing a separate ASP.NET application and just linking to it from your WSS instance if you need something that is not very CMS like.
  • User experience. Even though I said that WSS provides a consistent user experience (as one of it's benefits) it's consistently mediocre. I have yet to have anyone I work say anything to the tune of "well that was easy" when dealing with Page personalization or WebPart management. It has a long way to go to catch up with the Ektrons or Clearspaces of the world.

Well that's more than a mouthful and definitely more than two cents. Don't get me wrong WSS has it's selling points. For a client who mostly wanted to manage web content and documents I would probably put WSS at the top of my list as an offering. For anything else I'd be more than a little reluctant to throw it out there as an option.

But hey, that's just me.

Good Luck,
Tyler

Thursday, February 7, 2008

Adding a Blogger SiteMap to Google webmaster tools

I'm a huge fan of the Google Web Master Tools. If you run a site or are hubristic enough to weigh down cyberspace with your blog then it's really a wonderful tool when it comes to figuring out how Google is "seeing" your blog.

It also impresses upon the user how search engines work and go about indexing your content. I was trying to add a Site Map to my Blogger It's In System.What? account last night and I was getting a lot of grief. I was getting the following error:

The Sitemap must be located at http://[rootUrl]/. To add a Sitemap at http://[rootUrl]/feeds/posts/, first add that site to your account and then click the Add a Site link beside it.

Sitemap What this really means is that they want a Sitemap (the feed) to be at the root of the site. This can be tricky with a Blogger account if you don't know how to tickle the Url just right. Even though Blogger tells you to normally get at your site feed by going to either:

http://[YourBloggerSubDomain].blogspot.com/feeds/posts?redirect=false
OR
http://[YourCustomDomain]/feeds/posts?redirect=false

You can really this same feed off the site root which is will keep the Webmaster Tools happy. Try using either of the following for your site map:

http://[YourBloggerSubDomain].blogspot.com/rss.xml?redirect=false
OR
http://[YourCustomDomain]/rss.xml?redirect=false

It should work just fine. It's of note that you can also use /atom.xml?redirect=false.

Hope that helps a little. Now go plague the web with yet another blog post.

Best,
Tyler

Monday, February 4, 2008

Troubleshooting Access denied errors in SharePoint 2007

The other day we deployed a MOSS instance and and almost no one could log in! Site Collection Administrators were the only users who could log in to the site. All other users, even those who supposedly had Full Control were given the user terrifying Access Denied page. The most difficult part of troubleshooting this kind of error was trying to figure out where to start. The resolution was that we had stripped all permissions from the Master Page Gallery. Because of this no users (except Site Collection Administrators) could pull a Master Page. Here's how we figured it out.

SharePoint Access Denied

In the event log was the following exception which was pretty misleading. We thought there was some kind of exception being thrown, but after we stripped out all of our code we were still getting the Unhandled Access Exception.

Event code: 4011
Event message: An unhandled access exception has occurred.
Event time: 2/4/2008 9:37:53 PM
Event time (UTC): 2/5/2008 5:37:53 AM
Event ID: 32497872094d45978925a82fd98ceb48
Event sequence: 149
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/14371080/Root-1-128466631227046864
Trust level: WSS_Minimal
Application Virtual Path: /
Application Path: C:\Inetpub\wwwroot\wss\VirtualDirectories\80\
Machine name: W2K3-TYLER-VIRT
Process information:
Process ID: 2880
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Request information:
Request URL: http://w2k3-tyler-virt/Pages/Default.aspx
Request path: /Pages/APHOME.aspx
User host address: 192.168.1.204
User: W2K3-TYLER-VIRT\TestUser
Is authenticated: True
Authentication Type: Negotiate
Thread account name: NT AUTHORITY\NETWORK SERVICE
Custom event details:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Steps to Troubleshoot

  • First make sure the user should be able to log in. Have you added a group that gives the required users access (ie. an NT Authority\authenticated or a Domain\Users group)? Can users gain access as a Site Collection Administrator but not as full control? Are there any security policy settings set for the web application? Essentially make sure you haven't overlooked something.
  • Secondly, make sure you have a good MOSS/WSS install. If you having any glaring errors in your event log you should probably clean those up first. Troubleshoots get increasingly difficult when there's a lot of noise in the event log.
  • If you're trying to add/visit a page and are getting an Access Denied, ensure that the user has at least read rights to all the assets related to the page. This includes Master Pages, Style Sheets, Page Layouts, the Page/List Item itself and any other related assets.
  • Lastly I'd look at the Access Denied URL, if you simply get a:
http://[ServerName]/_layouts/AccessDenied.aspx?Source=[AnyUrl]

Then there's not really a lot to troubleshoot, you most likely have a configuration error. It's when the URL is of the form:

http://[ServerName]/_layouts/AccessDenied.aspx?Source=[AnyUrl] &Type=list&name=%7B12151589%2D7A0B%2D40EE%2DBD92%2DADB851B3D78E%7D

then you have something interesting to troubleshoot. Surprisingly enough SharePoint is telling us that we're trying to access a list and it's telling us to hit the road. The Name parameter is really a html encoded GUID...still don't believe me? What if I went ahead and html decoded it for you (I use this utility for that kind of stuff). Now it looks like:

http://[ServerName]/_layouts/AccessDenied.aspx?Source=[AnyUrl] &Type=list&name={12151589-7A0B-40EE-BD92-ADB851B3D78E}

Essentially we're looking for a list with the List ID of {12151589-7A0B-40EE-BD92-ADB851B3D78E}. It's time to play that age old game...FIND THE GUID!Now there's more than one way of tracking this list down. You can:

  • Write some SQL against the content database in question, this one is quick if you're familiar doing that kind of stuff but for most people this would be trouble.
  • Another option a little monotonous, it requires going into the list settings of each list in the site. You'll get a URL that will look like:
http://[ServerName]/_layouts/ListEdit.aspx?List={12151589-7a0b-40ee-bd92- adb851b3d78e}&Source=%2F%5Flayouts%2Fsitemanager%2Easpx%3FSmtContext% 3DArea%3A%3FSPWeb%3A0b1deb27%2Da646%2D4786%2Da29d%2D374b34449793%3A% 26SmtContextExpanded%3DTrue%26Filter%3D1%26pgsz%3D100%26vrmode%3DFalse

See our GUID above? Once you see the GUID in the List Settings of the list you know you've found the list in question.

  • The last that I recommend is using if you have access to the machine that SharePoint is running on is to install the SharePoint Explorer, a free tool provided by Ontolica. You can use this tool to go track down the list in question (below).

Finding a List ID GUID using SharePoint Explorer

Once you've found the list in question make sure that users can access this list. You do this by going in to the List Settings->Permissions for this List/Document Library and add permissions for at least Read.

That's it folks, hope she helps. You can also use the URL of an Access Denied page to troubleshoot access rights to List Items, but that's for another day.

My Best,
Tyler

Sunday, February 3, 2008

What Version of SharePoint are you Running? How about your client?

I recently made the mistake of assuming a client would run whatever version of SharePoint we were. I provisioned a SharePoint instance for our team to develop on that was not RTM while our client was running RTM. From the moment we started to build up the site on that non RTM machine we were screwed. It was a rookie mistake on my part, and one my team had to pay for. It's also one I'm not on repeating any time soon. For some reason the idea that there were different versions of SharePoint and that they might not all play nice seemed to have eluded me that day.

Needless to say when we took our shinny new content database and tried to move the site to the clients machine we got an error that looked a lot like:

Your backup is from a different version of Windows SharePoint Services and cannot be restored to a server running the current version. The backup file should be restored to a server with version ‘12.0.0.6219′ or later.

In addition to the fact that we were screwed, this meant that the schemas of our content database (running 12.0.0.6219) was different than that of our clients (running 12.0.0.4518). It's worth noting that just like the error message above says, you CAN restore content databases from earlier versions into newer ones (ie. you can restore an RTM 12.0.0.4518 content database into a Service Packed 12.0.0.6219 version of SharePoint). You just can't go the other way. Here's a quick grid with SharePoint versions from Penny Coventry's blog with updated links.

Name Version
MOSS 2007/WSS 3.0 Service Pack 1 (Contains the below) 12.0.0.6219
MOSS 2007/WSS 3.0 October 2007 Public Update 12.0.0.6039
MOSS 2007/WSS 3.0 August 2007 Hotfix 12.0.0.6036
MOSS 2007/WSS 3.0 RTM 12.0.0.4518

For those of you who dig pictures here's a quick way of telling which version of SharePoint 2007 (MOSS or WSS) you're running.

How to Tell the Version of SharePoint 2007 (MOSS or WSS)

  1. Navigate to the SharePoint Central Administration.
  2. Click on Site Actions->Site Settings.
  3. The version is just below Site Information (below).How to Tell the Version of SharePoint (MOSS or WSS) You're Running

Take care and may you avoid the mistakes I've made.

Regards,
Tyler

Saturday, February 2, 2008

My Zen Garden Challenge: Styling My Blogger Template

If you've ever been here before you might notice that this site now has a radically different look and feel. At work I've been doing a lot of CSS lately and at the same time have started to dislike my Blogger starter template.

I browsed a bunch of community generated Blogger templates but none of them really spoke to me, so I decided to make my own. It's interesting to note that doing a blogger template is a lot like doing a CSS Zen Garden challenge.

The first thing I did was go find a design I liked. I'm a terrible designer so anything I layout is usually heavily inspired by another design (almost to the point of piracy).

Next I took the blogger document, investigated the CSS and layout to see where I could hook in, grabbed some of the images from the source design and then went about applying the same styles to the Blogger html. This was quite a challenge, it took me a lot more time than I though it would. I'm sad to say that to find a design I liked, apply those styles to the Blogger html document, troubleshoot for IE 6, 7 and FF support took me about 6 hours total. I guess I'm not as quick as I thought I was. I feel like I could have done a lot better...

Some of my more frustrating moments were trying to get Google's Picasa to host my images. I tried for over an hour to upload images and then get Picasa to hand them back to a stylesheet without altering them. I played with over 3 different sets of URLs to the images tried uploading them through Picasa, Blogger and Windows Live Writer and for the life of me could not get them to come out the same way they went it (if at all)! I finally threw up my hands and signed up for a Yahoo Flickr account. I found Flickr easier to use and it was simple to get a universally accessible URL when it came time to get the images out.

Any ways, let me know what you think, I still need to fix the header image but that is definitely for another day. It's time to go enjoy some of this weekend.

Rediscovering some of CSS's pointy edges,
Tyler