måndag 2 juni 2008

Annoying WSS errors

It feels like I've gone through all of the classic errors that someone new to WSS will encounter. I will fill up this post as I encounter more and unfortunatly I can't remember all of the problems that I've gone through. =) .. Somehow it feels like the SharePoint-team is sponsored by the mental institutions and have signed an agreement to bring them a certain amount of new patients that needs therapy every year. I know that I soon might need it. Anyways...

Value does not fall within the expected range
This means the same as "index outside of range" or "the key is not present in the dictionary". Or make it simple, you have referenced something in a dictionary where the key isn't present. Like Trying to get a list from the SPWeb-object that doesn't exists. This troubled me for quite some time.

Cannot complete this action
Is most commonly due to user rights, or, the lack of. WSS need you to impersonate before doing certain kinds of tasks. Read this post. Another fantastic description of the problem. Not vague at all.

One or more field types are not installed properly. Go to the list settings page to delete these fields.
When you get this error, it probably is due to a reference to a field with special character in it's name. For instance, if you have a field namned "Problem type" it has to be referenced as "ProblemType" (WSS 3.0). To avoid this, and you really should, never name a field with a non-alphanumeric character. Use only numbers and letters.

Exception occurred. (Exception from HRESULT: 0x80020009 (Part 1)(DISP_E_EXCEPTION))
From what I've seen, this can come up on alot of different instances. This guy, David, has a solution for it in his blog.

To sum up his post:
stsadm.exe -o export -url http://yourweb/ -filename c:\yourweb.cab
stsadm.exe -o deletesite -url http://yourweb/
stsadm.exe -o import -url http://yourweb/ -filename c:\yourweb.cab

Worked fine for me, and resolved a problem with cached list templates that refused to take on new fields even though i retracted and deleted the solution where they originated from.

Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)) (Part 2)
The problem resurfaced when I tried to use a SPQuery to search for a SPUser. All other searches works fine. Another blog suggested that it could be due to a disposed SPSite. I notices that I had typed "type" instead of "Type" in the <Value>-tag. I changed it to a capital T and everything worked fine.

Exception from HRESULT: 0x81070215
Go to your schema.xml for the list you are trying to create and change the Name attribute of the element in your ElementManifest-file to the same name as the directory for the list (where you have put your schema.xml).

Inga kommentarer: