Thursday, September 30, 2010

Getting the GUID out of the AdminContent database in SharePoint 2010

Another fine blog post from Todd Klindt. Thanks for sharing.

Friday, August 27, 2010

SharePoint 2007 Crawled Property Creation

Just an interesting observation.

In the SharePoint 2007 farm, if there are more than one list columns with the same name, for example, "Report Name", not in the same list, of course, SharePoint creates only one crawled property for all those columns with the exact same name, and the crawled property is named as "ows_Report_x0020_Name".

Here is how I did the test.
  1. Create a list named abc with a column "Report Name", fill in some dummy value
  2. Do an incremental index
  3. In SSP, there is a new crawled property named "ows_Report_x0020_Name" created
  4. Create another list named xyz with a column "Report Name", fill in some dummy value
  5. Do an incremental index
  6. In SSP, there is still only one crawled property named "ows_Report_x0020_Name", there is nothing else similiar to "ows_Report_x0020_Name" 

Tuesday, August 24, 2010

SharePoint 2010 Application Development Resources

Developing Applications for SharePoint 2010

SharePoint 2010 Walkthrough Guide

SharePoint 2010 Developer Training Kit

 

URL path length restrictions (SharePoint Server 2010)

URL path length restrictions (SharePoint Server 2010)

Guide on resolving url length problem from the article:


  • Upgrade all the end-user browsers to Internet Explorer 8, which has a longer URL length limit.

  • Use shorter names for sites, folders, and documents and control the depth of the site and folder structures to reduce the lengths of URLs.

  • If possible or allowed, use ASCII names for sites, folders, and documents. This will avoid situations where the URL will be lengthened by being encoded.

  • To reduce the risk that the SharePoint Server 2010 end-users will encounter problems because of URL length limitations, we recommend that you apply the following effective limits in the deployment:

    • 256 Unicode (UTF-16) Code units - the effective file path length limitation, including a domain/server name

    • 128 Unicode (UTF-16) Code units - the path component length limitation

Monday, August 9, 2010

What's New of SmartTools for SharePoint Time Display Bug and Fix

If you have not heard of SmartTools for SharePoint, then you need to check it out. It has several very useful SharePoint 2007 extensions to "make your life as a SharePoint user, developer or administrator a little bit easier!", to quote from the site.

However, the WhatsNew web part displays the modified date and time coloumns incorrectly, specifically, it converts the time from SharePoint to local time one time more than necessary. For example, it shows "6:56 AM" for a document last modified at "11:56 AM". The SharePoint regioinal setting is US Central Time. You can see the difference is 5 housrs, which is the difference between US Central Daylight Time and GMT.

The fix is very easy. In the source code which you can download from the site, comment line 406 and 411, and uncomment line 407 and 410. See correct code below.

                    if (modifiedDateTime.Date == DateTime.Today)
                        row["ModifiedDate"] = "Today";
                    else
                    {
                        //row["ModifiedDate"] = SPUtility.FormatDate(SPContext.Current.Web, modifiedDateTime.Date, SPDateFormat.DateOnly);
                        row["ModifiedDate"] = modifiedDateTime.Date.ToShortDateString();
                    }

                    row["ModifiedTime"] = modifiedDateTime.ToShortTimeString();
                    //row["ModifiedTime"] = SPUtility.FormatDate(SPContext.Current.Web, modifiedDateTime, SPDateFormat.TimeOnly) ;


SPUtility.FormatDate assumes the given time is UTC time and converts to local time based on regional settings (See what is good to know about SPUtility.FormatDate). When the code gets the modifiedDateTime, it is local time already. Another conversion to local time therefore is not necessary.

In SharePoint, Datetime value is stored as UTC time. When setting datetime, SharePoint converts the input to UTC and stores the UTC value; when displaying datetime, SharePoint converts the UTC time to local time.

According to this blog sharepoint web services and utc time fun and games from Andy Burns, there is some kind of problem with web services.

Friday, July 23, 2010

SPItemEventReceiver ItemAdded not firing

If you have configured ItemAdded event handler on a document library, and if you upload the same document multiple times, the first time ItemAdded event handler is fired. With the just uploaded document still in the library, subsequent uploading of the same document will not cause the ItemAdded event to fire.

I assume that SharePoint treats the subsequent uploading of the same document as an item being updated, not as being added, as in adding a new one.

Wednesday, July 14, 2010

FAST Query and FAST Content Search Service Applications in a SharePoint 2010 deployment Explained

After FAST for SharePoint 2010 (FAST4SP) is installed and configured, there are 2 search service applications associated with FAST4SP: FAST Query Search Service Application and FAST Content Search Service Application (Your search service application name could be different). It took me a while to realize the differences between those 2 service applications. The following blog entry helped me a lot learning those 2 service applications.

The two types of Search Service Applications (in a SharePoint 2010 deployment with FAST Search Server) - On The Search - Site Home - MSDN Blogs

In summary, FAST Query is used to service all search queries and crawl People content, i.e., User Profiles. So under the Search Administration page for FAST Query, there should be one and only one Content Source defined, with Start Addresses with only one entry, like sps3://hostname. Also search scopes should be defined under FAST Query service application. This blog entry demonstrates how to create a search scope in FAST Query from content source defined in FAST Content.

FAST Content is used to crawl all other content sources other than People. Out of the box under the Search Administration page of FAST Content, we should remove the entry of sps3:// from the content source's start addresses text box. Also note there is no search service application proxy for FAST Content.