Tuesday, December 23, 2008

Recommended SharePoint application pool settings

Joel Oleson has a great blog regarding the best practice when comes to application pool performance settings: http://blogs.msdn.com/joelo/archive/2007/10/29/sharepoint-app-pool-settings.aspx. Do refer the comments left by other readers as well.

Tuesday, September 9, 2008

Check SharePoint version

Great place to find out which version of SharePoint you’re running on. http://www.mindsharpblogs.com/penny/articles/481.aspx. Big thanks to Penny Coventry for keeping the information up to date.

PDF iFilter Updates

It’s been a while since I’ve last configure the PDF iFilter for SharePoint. The last one I’ve done was for SPS 2003. For MOSS 2007, the process is pretty much the same, except for file path difference and configuration page changes. Here’s the steps taken from MS KB http://support.microsoft.com/kb/832809/en-us.


Download Adobe PDF IFilter 5.0 from the following Adobe Web site: http://www.adobe.com/support/downloads/detail.jsp?ftpID=2611 (or search Google for latest installer from Adobe).(http://www.adobe.com/support/downloads/detail.jsp?ftpID=1276)


Stop the IIS Admin service. To do this, follow these steps:


Click Start, point to Administrative Tools, and then click Services.


Right-click IIS Admin Service, and then click Stop.


Run the Adobe PDF IFilter 5.0 Setup program to install the filter on the server.

For WSS 2.0, install the PDF iFilter on the SQL and WSS servers.

For SPS 2003, install the PDF iFilter on the SQL and Index servers.

For WSS 3.0, install the PDF iFilter on servers running the WSS [spsearch] search service.

For MOSS 2007, install the PDF iFilter on the Index servers.

After installing the iFilter, perform Steps 5, 6, and 7 on all the Web Front End servers in the farm.


Register the Adobe PDF IFilter. To do this, follow these steps:


Click Start, and then click Run.


In the Open box, type cmd, and then click OK.


Switch to the folder that contains the Adobe PDF Filter 5.0 files. For example, switch to the following folder:

Drive:\Program Files\Adobe\PDF IFilter 5.0


Type regsvr32.exe pdffilt.dll, and then press ENTER.


If you receive a message that states that the operation was successful, click OK .


Type exit, and then press ENTER to exit the command prompt.


Copy the .gif file that you want to use for the icon to the following folder on the server, as appropriate for your situation:

SharePoint Portal Server 2003 - Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Template\Images

SharePoint Server 2007- Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Images


Edit the Docicon.xml file to include the .pdf extension. To do this, follow these steps:


Start Notepad, and then open the Docicon.xml file. The Docicon.xml file is located in one of the following folders on the server:

SharePoint Portal Server 2003 - Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\60\Template\Xml

SharePoint Server 2007- Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\Xml


Add an entry for the .pdf extension. For example, add a line that is similar to the following to the Docicon.xml file, where NameofIconFile is the name of the .gif file:

<Mapping Key="pdf" Value="NameofIconFile.gif"/>


On the File menu, click Save, and then quit Notepad.


Restart the server.


Add the .pdf file type to the content index. To do this, follow these steps: (these steps are for SPS2003. MOSS2007’s steps are to go to SSP configuration)


Connect to the portal site, and then click Site Settings.


On the Site Settings page, click Configure search and indexing under Search Settings and Indexed Content.


On the Configure Search and Indexing page, click Include file types under General Content Settings and Indexing Status.


On the Specify File Types to Include page, click New File Type.


On the Add File Type page, type pdf in the File extension box, and then click OK.


Update the context indexes for portal content and for non-portal content. To do this, follow these steps: (these steps are for SPS2003. MOSS2007’s steps are to go to SSP configuration)


On the Site Settings page of the portal site, click Configure search and indexing under Search Settings and Indexed Content.


On the Configure search and indexing page, click Manage content indexes under Content Indexes.


On the Manage Content Indexes page, click the down arrow next to the name of the index that you want to update, and then click Start Full Update.

For the image icon. Search for a pdf16.gif file using Google Image search, or download from Adobe at here.






Default MOSS IFilters: http://technet.microsoft.com/en-us/library/cc261754.aspx

Tuesday, August 19, 2008

SharePoint Audit Report does not include workflow events

Recently a colleague of mine wanted to generate the audit report for workflow in a SharePoint site collection. However, an error page was shown instead, stating Report contains no data. A quick check on the web shows that this is a known issue, and SharePoint does not provide workflow auditing report in this context. So why give this option in the first place?

KB article: http://support.microsoft.com/kb/953133


Wednesday, August 13, 2008

Windows service and network port requirements list

This KB article from MS provides a list of ports used by services, which may come handy when troubleshooting network issues, or configuring firewalls. URL at http://support.microsoft.com/kb/832017.

Monday, August 4, 2008

Invalid characters for MOSS 2007

Recently there was some strange issues surfacing, which my team in the project believe is due to some invalid characters being used in the filename of the content pages or document filenames. Some of the symptoms observed are:

1.       For WCM/ECM, the Page Editing Toolbar sometimes disappears.

2.       User unable to perform upload multiple files where there’s invalid character in the filename.

For the full list of invalid characters for site names, folder names, server names, and file names, refer to the MS KB905231 at http://support.microsoft.com/kb/905231.

Saturday, July 19, 2008

SharePoint user full name not reflected according to AD

Ok, first of all, this issue has nothing to do with user profile crawling. SharePoint seems to create some kind of user information store as of when a user first logs into the site collection. These information will not be updated when there are changes in the user’s AD user object, such as full name, department etc. Lots of people have this problem and blogged about it, but no real solution. I’m sure they have some kind of workaround but no one has posted it before.

Here’s my workaround. I’m sure MS does not support such actions, but we are desperate people (sometimes, at least). Run these SQL SELECT statements within your content DB, and you’ll know what to do next…

SELECT * FROM AllUserData WHERE tp_ContentType = 'Person'


SOME IMPORTANT ADVICE: 1)Backup your Content DB first before attempting any changes. 2) Experiment on your sandbox before making these changes permanent at your other actual environments. 3)You take responsibility on your own actions.

SharePoint Site column default value not pre-selected

After fiddling with SharePoint custom content types for a while, the default values on my choice site columns in my document library suddenly refuses to work. Although a default value is being set, the items are created with these field being blank, where it suppose to fill in with the defined choice default value, as stipulated in the content type’s site column.

Apparently, the content type has to be set as the document library’s default content type, else the choice column’s default values will not be pre-selected. In addition, if you have multiple content type that uses the same choice site column, setting any one of content type as default content type would make the other content type works too.

Ref: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1706972&SiteID=1

Unable to manage IIS 6.0 by using Server Manager if two threads access IIS 6.0 at the same time

I ran into this funny problem in the production environment recently. When launching IIS Manager (inetmgr) in the WFE servers, it shows the server, but it does not allow expanding of the tree to reveal the standard Web Sites, Web Application Pools sub trees.

A hot fix has to be applied to fix this problem. More info at MS KB946517.

Wednesday, July 16, 2008

Powerful AD Administrative Tools (FREEWARE!)

Found this great tool call Password Control for making bulk changes to user accounts in AD. (Thanks to a colleague for giving the tip!). Check out the feature set at http://www.wisesoft.co.uk/. Other than Password Control, there are other great freeware for making an AD admin’s life easier too!

Monday, July 14, 2008

Change AD Account Password via Coding

Found a few great articles on creating a custom page to allow user to change their AD login password through coding (cause I need to do one quickly here).

The new .NET Framework 3.5 provides new method from the System.DirectoryEntry.AccountManagement namespace to change password easily. Background information at here.

Steve Mushkat has a blog entry with code example on how this is done at http://glorix.blogspot.com/2007/10/ad-change-password-webpart.html. His example is base on SharePoint, but can be easily adapted for other flavours.

Update: I've tried the code on my SharePoint implementation. It worked fine on a single-box MOSS environment, but it didn't work on a small farm setup. Not sure why, but I'm suspecting the environment that didn't work did not have kerberos configured properly. I've modified the code slightly to make it workable:

string strADDomain = ConfigurationSettings.AppSettings["ChangePassword_Domain"]; string strADUser = ConfigurationSettings.AppSettings["ChangePassword_User"]; string strADPassword = ConfigurationSettings.AppSettings["ChangePassword_Password"]; string strLoginName = string.Empty; SPWeb web = SPControl.GetContextWeb(this.Context); strLoginName = web.CurrentUser.LoginName; PrincipalContext domainContext = new PrincipalContext(ContextType.Domain, strADDomain, strADUser, strADPassword); UserPrincipal user = UserPrincipal.FindByIdentity(domainContext, strLoginName); try { user.ChangePassword(this.txtOldPassword.Text, this.txtNewPassword.Text); this.lblMessage.Text = "Password changed. Please close this browser window and log back on with your new password."; } catch (Exception ex) { this.lblMessage.Text = String.Format("Password couldn't be changed due to restrictions: {0}", ex.Message); } finally { user.Dispose(); domainContext.Dispose(); }

Wednesday, July 2, 2008

SharePoint publishing timer jobs woes

I hit a problem where the content management’s scheduling feature were not working. I am able to set the start and end publishing dates, but there’s no changes when the time comes to publish/unpublish the pages. Apparently this is due to missing timer job definition for the particular web application that is hosting the particular site collection.

The job does not exist in the first place because the web application were created without creating the publishing/collaboration site collection from the GUI. Instead, I’ve added the restored content DB that was build on another SharePoint box and added it directly into the web application. If I were to create a publishing/collaboration site collection, the site provisioning process would have added the missing three jobs for content scheduling, and two more jobs for handling variations.

Therefore, to get the jobs back on the web application, I have to:

1. Create a new web application

2. Create a new site collection, choosing the correct site collection template (either publishing or collaboration)

3. Ensure the jobs are created by checking it from Central Admin à Operations à Timer jobs definitions. Also check whether it runs every minute.

4. Remove the content db of the newly created site collection

5. Add the restored content db

Additional observations: If the existing web application with the restored content database already missing the job definitions, removing the content database and creating a new publishing/collaboration site collection on top of it WOULD NOT solve the problem. Strangely, the job definitions are created, but it just wouldn’t execute as defined by the minute frequency. Thus, best bet is to delete the web application and start all over again.

Janne Mattila’s blog has more detail on this issue.

Update: I tried to make the same steps as mentioned above on another enviornment, and it didn't work. I even tried to schedule a publishing start date for a new content page on the brand new blank collaboration site template, just to be sure. The page on the blank collaboration site works, but it just wouldn't work once I restore my deployment content DB. I've inspected the timer job status and discovered that the timer job last run date/time was stopped at the instance when I change the web application's content DB to the deployment content DB.

Long story short, I found MS KB942989 mentioning the problem of missing timer jobs, but not on timer job stop executing. However, it indicates that a post-SP1 hot fix could fix the problem. I've downloaded, applied to all WFE and index server, and that solves the problem magically!

More information on the hot fix at MS KB942989.

SharePoint Current Number of Sites 0 after SQL Restore of Content DB

I was planning to restore a content DB backup into a SharePoint box. So I’ve created the web application, removes the default content database and add the restored content DB into the web application. Once this is done, the value “Current Number of Sites” is showing up as 0.

Apparently, when adding a content DB into a web application, the SiteIDs (GUIDs) in the content DB are added into the [SharePoint_Config].[SiteMap] table. If a site with the same SiteID already exist in the SharePoint box, the add process will fail without much feedback from the Central Admin page. The logs from the 12 hive doesn’t give much indication either. The only clue you get is from the application event log. An inspection on the event log shows the following error:

Therefore, must take note that no two identical site can reside within the same SharePoint box. There might be possible to patch the SiteID for the restored content DB to another GUID value, provided you know where to patch J.

Friday, June 27, 2008

Turn on HTTP Compression on IIS 6.0

I’ve seen my colleague have done it before, so I decided to try it out myself on my current project.

Here’s the background information on HTTP compression from TechNet, Using HTTP Compression for Faster Downloads (IIS 6.0).

Information on turning on and configuring HTTP compression from TechNet just too brief, as seen in the guide here. It shows how to turn on the HTTP compression feature from IIS 6, but that’s only half of the steps to make HTTP compression works. Therefore, I turn to blogs instead. Following the steps exactly from this article by Donny Mack works well for my case. Other’s might not be so lucky, as mentioned by Jeff Atwood on his blog.

In summary, following are the steps to turn on HTTP compression:

1. From IIS management console (inetmgr), right-click on Web Sites, then click properties, go to Service tab. Under HTTP compression, check Compress application files and Compress static files. Leave the Temporary directory and Maximum temporary directory size as default.

2. This step is optional for me, as I didn’t observe any difference in compression ratio if I skip this step. Right-click on Web Service Extension node and select Add a new Web service extension. In put extension name “HTTP Compression”, click on Add button and select “C:\WINDOWS\system32\inetsrv\gzip.dll”, check the checkbox Set extension status to Allowed.

3. Right-click on the root of the IIS server and select properties. Check Enable Direct Metabase Edit.

4. Now we proceed to edit the MetaBase.xml file, located at “C:\WINDOWS\system32\inetsrv\MetaBase.xml” Do make a backup first before you proceed.

5. Within the file, locate the tag <IISCompressionScheme>. There are two entries with the same tag, the first has a property of “…Compression/deflate”, while the second has a property of “…Compression/gzip”. We’re interested on the second one. I tried making changes on the deflate but there’s no difference for my case. So I left it as it is.

6. Most important properties to change are HcDynamicCompressionLevel, HcFileExtensions and HcScriptFileExtensions. I’ve set HcDynamicCompressionLevel to 10, added static file extensions to HcFileExtensions, and dynamic file extensions (e.g. aspx) to HcScriptFileExtensions. Note that the file extensions must be separated by next line (enter key).

7. Save the MetaBase.xml file and perform a iisreset.

I’ve used several pages from my SharePoint 2007 portal do benchmark the result, using Ethereal to sniff out the total packet size. Overall, I witness roughly compression ratio of 65% to 75%. Adding file extensions for images would not help much, as most browsers would have cached the files and would not perform another download. Unless, your pages contains lots of different images that the browser would not have cached before.

The following properties information are rather useful, taken directly from Donny’s blog:

  • HcDoDynamicCompression. Specifies whether dynamic content should be compressed. This is important because dynamic content is by definition always changing, and IIS does not cache compressed versions of dynamic output. Thus, if dynamic compression is enabled, each request for dynamic content causes the content to be compressed. Dynamic compression consumes considerable CPU time and memory resources, and should only be used on servers that have slow network connections, but CPU time to spare.
  • HcDoStaticCompression. Specifies whether static content should be compressed.
  • HcDoOnDemandCompression: Specifies whether static files, such as .htm and .txt files, are compressed if a compressed version of the file does not exist. If set to True and a file doesn't exist, the user will be sent an uncompressed file while a background thread creates a compressed version for the next request.
  • HcDynamicCompressionLevel. VAL(1-10) specifies the compression level for the compression scheme, when the scheme is compressing dynamic content. Low compression levels produce slightly larger compressed files, but with lower overall impact on CPU and memory resources. Higher compression levels generally result in smaller compressed files, but with higher CPU and memory usage.
  • HcFileExtensions. Indicates which file name extensions are supported by the compression scheme. Only static files with the specified file extensions are compressed by IIS. If this setting is empty, no static files are compressed.
  • HcScriptFileExtensions. Indicates which file name extensions are supported by the compression scheme. The output from dynamic files with the file extensions specified in this property are compressed by IIS.

Wednesday, June 4, 2008

SharePoint security cache AD Group?

There seem to be a funny problem where AD group names are cached by SharePoint. So far I've observed two scenarios

Scenario 1: Unable to set AD group into MOSS security

I’ve created my own AD group and added the some users into the AD group. Then I add the AD group directly into some SharePoint subsite and granting them some permissions. This works out fine. Then I remove the AD group from SharePoint , delete the group from AD, and repeat the process again. I use back the exact same AD group name. This time, the user will not have access, as though the AD group is not added into SharePoint at all.

This problem can be fixed by performing an iisreset before re-adding the newly created AD group (with identical name as the previously deleted one) back into SharePoint. I’ll be performing “iisreset”s in the future when I’m setting up user permissions.

Scenario 2: People picker does not have the AD group

The scenario is like this: from a web part properties page, under Advnaced section, click on the browse button to bring up the people picker. Switch to find under Distribution/Security groups and perform a search. The AD groups that suppose to be around are not.

To fix this problem, just perform a full user profile import from the Shared Service Provider administration. But, there's a catch: you MUST delete all existing user profile, by viewing all existing user profile, and select all to perform the delete. Yes, painful process as there's no option to delete all existing user profile data, and it didn't work if you just perform a full user profile import directly.

Update: I've written a small console application to quickly delete all user profiles:

/*Include the following namespaces*/ using Microsoft.SharePoint; using Microsoft.SharePoint.Administration; using Microsoft.Office.Server.UserProfiles; using Microsoft.Office.Server; /*Here's the quick and dirty method*/ public void PurgeUserProfile(string url_) { using (SPSite site = new SPSite(url_)) { ServerContext context = ServerContext.GetContext(site); UserProfileManager profileManager = new UserProfileManager(context); foreach (UserProfile profile in profileManager) { System.Console.WriteLine("Deleting " + (String)profile[PropertyConstants.AccountName].Value); profileManager.RemoveUserProfile(profile.ID); } } }

Friday, May 23, 2008

SharePoint Tool Pane, where are you?

A colleague of mine are creating a new master page for an ECM site. Once all SharePoint controls were included into the new master page, we found that the tool pane (the one that shows web part properties) went off the grid, not restricted by the boundary of HTML tables etc.

After some research, it is concluded that the mater page need to include a PlaceHolder tag with an ID of “MSO_ContentDiv”. Followed by the PlaceHolder is a HTML table tag with an id of “MSO_ContentTable”. Both of these tags can be found in OOB SharePoint master pages. Once these two tags are in place, the tool pane attaches itself to the left side of this HTML table when it is summoned.

Thursday, May 15, 2008

Extending SharePoint Page Layout

Found this blog entry from Janne Mattila's regarding extending page layout to include your own funky stuff. The example given are for custom language change, dynamic master page change and dynamic page layout swapping. For my case, I needed to do this to capture statistics of page hits for specific pages. Refer to here for more details.

Updating SPListItem from code

I was writing some codes to update some of the SPListItem column values. Typically after changing the column values of an SPListItem, you have to invoke the SPListItem.Update() method to commit the changes. Later on I found out there’s two other update method, namely SPListItem.SystemUpdate() and SPListItem.UpdateOverwriteVersion().

SystemUpdate() updates the SPListItem without affecting the system dates of the item and version number. So this is useful for my case as my little console application are performing mass update from behind the scene. As for UpdateOverwriteVersion(), I’m not sure what it does, base on description it overwrites the current version, which I think would affect the system dates and version.


More reference at MSDN:



Wednesday, May 7, 2008

Changing Links List In SharePoint 2007 To Open In New Browser Window

Much to my disappointment, Links list in MOSS 2007 still does not have the feature to set whether the link should open a new browser window when the user clicks on the URL value. There’s quite a handful of blogs writing how to do this. Here’s my take on how I go about doing it.

1. Create a new content type, inheriting from Links list. I’ll call it Custom Links

2. Add a new site column to the Custom Links content type call “Open In New Browser” of type Boolean (Yes/No). This column will indicate whether the hyperlink should open in a new browser window or on existing browser window.

3. Add some hyperlinks into the list. This will help visualization during modification in SharePoint designer.

4. For my case, my users will only view Custom Links using several custom views. So I use the SharePoint Designer approach. Locate and open the view pages in SharePoint Designer.

5. Right-click on the Custom Lists web part and select “Convert To XSLT Data View”.

6. Locate the URL field by clicking on the URL value on screen.

7. Referring to the screenshot, immediately after the xsl otherwise tag, replace the whole chunk of code starting from the Anchor tag with the following:

<xsl:choose> <xsl:when test="@Open_x0020_In_x0020_New_x0020_Br='1'"> <A onfocus="OnLink(this)" HREF="{substring-before(@URL, ', ')}" target="_blank"> lt;xsl:choose> <xsl:when test="substring-after(@URL, ', ')=''"><xsl:value-of disable-output-escaping="no" select="substring-before(@URL, ', ')" /></xsl:when> <xsl:otherwise><xsl:value-of select="substring-after(@URL, ', ')" /></xsl:otherwise> </xsl:choose> </A> </xsl:when> <xsl:otherwise> <A onfocus="OnLink(this)" HREF="{substring-before(@URL, ', ')}"> <xsl:choose> <xsl:when test="substring-after(@URL, ', ')=''"><xsl:value-of disable-output-escaping="no" select="substring-before(@URL, ', ')" /></xsl:when> <xsl:otherwise><xsl:value-of select="substring-after(@URL, ', ')" /></xsl:otherwise> </xsl:choose> </A> </xsl:otherwise> </xsl:choose>

8. Optional: Somehow the URL column became not sortable and has a funny formatting. Easily fixed by making it sortable again by changing the sortable value to 1.

Additional references that uses different methods below: http://wss.collutions.com/Lists/FAQ/DispForm.aspx?ID=254 http://www.andrewconnell.com/blog/articles/SharepointLinksListOpenInNewWindow.aspx http://weblogs.asp.net/bsimser/archive/2005/02/07/368326.aspx

Monday, May 5, 2008

Rendering of SharePoint controls base on user permission

The SharePoint server control SPSecurityTrimmedControl can be used to control rendering of page elements/components base on user’s permission. The PermissionsString  property can be used to specify users with what permissions are allowed viewing of the page element/components within. For a list of possible PermissionsString, refer to http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spsecuritytrimmedcontrol.permissionsstring.aspx. More information at Mark Wagner’s blog.

Adding items to the end of a breadcrumb

This blog from Danny Chan gives some idea on how to add some additional items at the end of the breadcrumb on MOSS 2007. Check it out at http://weblogs.asp.net/dannychen/archive/2005/10/19/427924.aspx.

Extending SharePoint Menu Control

The ECM team has uploaded the source code for the AspMenu web control. This will allow us to extend the functionality of the menu controls on MOSS 2007. More info at http://blogs.msdn.com/ecm/archive/2006/12/02/customizing-the-wss-3-0-moss-2007-menu-control-mossmenu-source-code-released.aspx.

Wednesday, April 16, 2008

Using [Today] in SharePoint calculated fields

I revisited my previously used SPS2003 old trick to force the usage of [Today] value in calculated fields, such as doing a [Created]<[Today]. I think I’ll note it down here for future reference.

By default, SharePoint will not allow creation of a calculated field that is partly derived base on functions such as [Today]. Therefore, the work around is to “trick” SharePoint, literally. This is done by deliberately creating a field call [Today] that of a single line of text (or anything else), then create your calculated field using this text-base [Today] field, e.g. [Created]<[Today]. Once you’re done creating the calculated field, remove the fake [Today] field. Once this is done, the calculated field will make use of the actual [Today] function and calculate your date value accordingly. This article from Chris Johnson has more detail on this approach.

However, do note that there are limitations in using this method since the introduction of content type and site column in MOSS 2007. If you are creating content type up front instead of creating a list the SPS2003 method, you must make sure you do not remove the fake [Today] column from the content type immediately after you’ve created your calculated field. Doing so will prevent you from setting your content type into your list or document library, as SharePoint will perform a round of validation to ensure you do not use [Today] in your fields. Instead, remove the fake [Today] field after you’ve set them into your list or document library.

Also, think there should be a reason why creation of calculated field with [Today] in it is prevented. One reason I can think of is probably for performance reason. Imagine loading a big list and exposing the calculated field. Each rendering of this field might probably invoke the [Today] function, which at the end gives some performance hit to the loading. Therefore, should try to avoid using this method unless it is necessary.

MOSS 2007 Formulas and Functions

While working with calculated fields, I’ve found the Formulas and Functions page from Microsoft Office official site which contains listings of formulas and functions that can be used. Some of the functions provided are Date and time, Financial , Information, Logical, Lookup and reference, Math and trigonometry, Statistical, and Text and data. For quick reference, refer to Common Formulas page of often used formulas.

Friday, April 11, 2008

Exporting MOSS Content Type as a Feature

While going through on the best approach on developing content type for the portal I’m currently working on, I’ve stumble across this very cool tool call CTExplorer. It a content type browser, with the ability to export a selected content type into a feature. Therefore, instead of creating feature up front (ouch!), I can build the content type in MOSS 2007, and export it out later. Now that’s sort of like reverse-engineering.

CTExplorer can be found at this page, or download it directly at here. The page is in German, but you can translate it easily if required. I haven’t try out whether it works or not, so I’ll update this post once I’ve tried it out.

Update 2011-01-17: Apparently there is a more complete tool for exploring your SharePoint instance now, call the SharePoint Manager. It's available in Codeplex at http://spm.codeplex.com/.

Thursday, April 10, 2008

Enable VS 2008 integration with VSS 2005

To enable source control in Visual Studio .NET 2008 , you’ll need to install a CTP update for Visual SourceSafe 2005. Download it here. For reason why there’s such problem, refer to here.

Updated 20081223: Windows Vista workstation may need to include this service pack. Also, depending on the sequence of installation, you may need to turn on the VSS integration manually in VS.NET, under Tools -> Options -> Source Control.

Thursday, April 3, 2008

MOSS 2007 Performance Limitations

While determining the taxonomy for the portal I’m working on, I was thinking whether it should be one with a flat structure or lots of deep subsites. The software boundaries for MOSS 2007 article on MSDN provides a good guideline on my taxonomy design. The following guideline table comes from the article:

Site object

Guidelines for acceptable performance


Scope of impact when performance degrades

Site collection

50,000 per content database

Total farm throughput degrades as the number of site collections increases.


Site collection

150,000 per Web application

This limit is theoretical, and is dependent largely upon:

· Performance of the database server on which the configuration database resides.

· Performance of the Web servers in the farm.

· Network bandwidth between the Web servers and the database server.

This is not a hard limit, and assumes a single database server. Your environment may not be able to host this many site collections per Web application. Distributing content databases across additional database servers can increase the effective limit of the number of site collections per Web application. You should perform testing to determine the actual effective limit in your environment.


Web site

250,000 per site collection

You can create a very large total number of Web sites by nesting the subsites. For example, 100 sites, each with 1000 subsites, is 100,000 Web sites. The maximum recommended number of sites and subsites is 125 sites with 2,000 subsites each, for a total of 250,000 sites.

Site collection


2,000 per Web site

The interface for enumerating subsites of a given Web site does not perform well as the number of subsites surpasses 2,000.

Site view


5 million per library

You can create very large document libraries by nesting folders, using standard views and site hierarchy. This value may vary depending on how documents and folders are organized, and by the type and size of documents stored.



2,000 per view

Testing indicates a reduction in performance beyond two thousand items. Using indexing on a flat folder view can improve performance.

List view

Document file size

50MB (2GB max*)

File save performance is proportional to the size of the file. The default maximum is 50 MB. This maximum is enforced by the system, but you can change it to any value up to 2 GB.

Library, file save performance


2,000 per Web site

Testing indicates a reduction in list view performance beyond two thousand entries. For more information about large lists, see White paper: Working with large lists in Office SharePoint Server 2007.

List view

Field type

256 per list

This is not a hard limit, but you might experience list view performance degradation as the number of field types in a list increases.

List view


2,000 per document library

4,096 per list

This is not a hard limit, but you might experience library and list view performance degradation as the number of columns in a document library or list increases.

Library and list view

Web Part

50 per page

This figure is an estimate based on simple Web Parts. The complexity of the Web Parts dictates how many Web Parts can be used on a page before performance is affected.


Go to http://technet.microsoft.com/en-us/library/cc262787.aspx for more details.

Tuesday, April 1, 2008

Audience Targeting won't work with AD Group in MOSS User Group

I’ve already know about this issue and got “bitten” again today. I’m making sure that I’ll remember this time by blogging it.

Audience Targeting now works with MOSS Group as well without a need to create audience rule and compiling them. However, the users must be added to the MOSS user group directly for it to work. Adding AD user group into the MOSS user group will not work. Instead, add the AD group directly when specifying the audience targeting for the web part.

Another side effect of that also means you wouldn’t be able to find out the user’s MOSS group if he is added to the MOSS group via an AD group. The following code gives me no MOSS group at all, even though the person is already added into the MOSS group via AD group:

SPUser user = web.CurrentUser;

Foreach (SPGroup group in user.Groups)


                Str += group.Name + “<br/>”;


Therefore, do take note of this when you plan to roll out some custom functionality which is base on MOSS user groups.

Tool for registering SharePoint 2007 event handler programmatically

Found this great tool by Patrick Tisseghem's Blog [MVP SharePoint] for registering SharePoint 2007 event handlers to specific list or document libraries. Works like a charm on my MOSS 2007 SP1 VM. Great for quick deployment for development/testing purposes. Download it from his blog page here: http://www.u2u.info/Blogs/Patrick/Lists/Posts/Post.aspx?ID=1547

MOSS Event Handler

Monday, March 31, 2008

Understanding Kerberos

These two articles gives a very good starting point in understandaing how Kerberos works. The fundamental knowledge is useful when you are planning to enable Kerberos authentication for SharePoint portal, especially you are building some custom application on top of SharePoint, or in my case, K2.NET, which will not work without Kerberos authentication. Exploring Kerberos, the Protocol for Distributed Securityin Windows 2000-- MSJ, August 1999 http://www.microsoft.com/msj/0899/kerberos/kerberos.aspx TechNet Support WebCast Troubleshooting Kerberos authentication with secure Web applications and Microsoft SQL Server http://support.microsoft.com/kb/842861

SharePoint: Adding Custom Field in Content Query Webpart

Found this article at MSDN and ECM Team Blog which describe how to add a custom field into the presentation of content query webpart. The process involve two major work:

1. Export content query webpart into a dwp file, and add the custom fields.

2. Modify the XSLT to define the presentation for the custom field. The XSLT file is located in the folder Style Library à XSL Style Sheet àItemStyle.xsl, which you’ll need SharePoint Designer to access and modify.

Ref: http://msdn2.microsoft.com/en-us/library/bb850574.aspx http://blogs.msdn.com/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part.aspx http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!491.entry

Adding custom property into SharePoint Advance Search

It is not that difficult to add a property to be filterable in advance search, as long as you know how in the first place!

Ok, let’s say if you built a custom content type with custom column, and you want to make it searchable (must be index-able as well up front) in advance search, these are roughly the things you need to do:

1. Built your content type properly. Don’t simply add a field on the fly to your document library etc, as those don’t seem to be able to be indexed.

2. Make it indexed. Add the custom property into part of the index regime of the index service. This is done from SSP administration à Search Settings à Metadata Property Mapping. Take note of the property name, as it will be referenced in putting the field into the advance search property drop down list. Perform a crawl when you’re done.

3. Add into the Advance Search’s Properties. Go to the advance search page and edit the advance search web part. Under the Properties setting, add the custom property into the properties XML.

The XML should be pretty straight forward, but do refer to this blog for more information about it: http://www.sharepoint-tips.com/2006/07/found-it-how-to-add-properties-to.html

Hiding field controls in a page layout from presentation

I’ve been looking around on hiding some fields from the content page, and allowing editing only during edit mode. Finally found it on this blog, which states that there’s an EditModePanel under the SharePoint Server Controls in the Toolbox of SharePoint Designer. Everything that you drop into it will only be visible during edit mode of the page. So simple actually!


Friday, March 7, 2008

Where is the Language Switcher? (MOSS Variation Label)

I’ve been following the guide in this article for a while, but I just don’t seem to get the nice little language switcher drop down list to appear on my SharePoint publishing site. After some additional research:

  • This other how-to article pointed out that you will have to assign the variation(s) to your master page before the variation label drop down list appears. In short, this is done by going into the Site Settings à Master Page Gallery. Check out the master page your publishing site is using and edit its properties. Under Variations section, pick the language you want to appear on the variation label drop down list.
  • Apparently the variation label drop down is disabled to improve performance. You'll need to modify the VariationsLabelMenu.ascx file in the CONTROLTEMPLATES folder to remove the commented line of code. (I wonder why we have to find this information from some blogs instead of from a proper MS documentation...)

System Center Capacity Planner with MOSS/WSS Capacity Model

Other than the HP capacity planning tool that we can use to size hardware required for MOSS, these tools from Microsoft seems to be the new alternative.

Head to official SharePoint blog for more details. Download Capacity Planner 2007 and SharePoint Capacity Models. Tutorials over here and here.

Wednesday, March 5, 2008

Thursday, February 28, 2008

MOSS 2007 Usage Reports

I’ve been searching for an inventory of MOSS 2007 usage reports. This page seems good enough: http://www.thesug.org/mossasaurus/Wiki%20Pages/Web%20Analytics.aspx.

But what I really hope for is an inventory listing with short description of each report, and with all the screenshots. Hopefully I can find one soon.


Managing Enterprise Metadata with Content Types and Search [SharePoint]

Bump into this great write up by Robert Bogue on content type and ways to expose those custom metadata into search. IT starts with real business problem, and then move to example and screen shots on setting things up. Now that’s business and tech know-how in one!


Introduced here: http://blogs.msdn.com/sharepoint/archive/2007/10/12/managing-enterprise-metadata-with-content-types-and-search.aspx

Direct download here: http://go.microsoft.com/fwlink/?LinkId=101604&clcid=0x409



MOSS additional IFilter Pack

Although MOSS 2007 now has pdf IFilter included (not included in SPS2003 btw), there are still other file types that are not showing up with proper icon. So here’s an filter pack to handle some of those missing files, such as:


·         Metro (.docx, .docm, .pptx, .pptm, .xlsx, .xlsm, .xlsb)

·         Zip (.zip)

·         OneNote (.one)

·         Visio (.vdx, .vsd, .vss, .vst, .vdx, .vsx, .vtx)


More details at http://blogs.msdn.com/sharepoint/archive/2007/12/20/ms-filter-pack-released.aspx