Friday, February 13, 2009

Cause of Audience Targeting Error Log

The following error was logged on the MOSS WFE servers intermittently without any pattern in the sense of frequency. It happens once in a blue moon.

Event Type: Error Event Source: Office SharePoint Server Event Category: Office Server General Event ID: 7888 Date: 2/11/2009 Time: 5:56:21 PM User: N/A Computer: MOSSPROD01 Description: A runtime exception was detected. Details follow. Message: Thread was being aborted. Techinal Details: System.Threading.ThreadAbortException: Thread was being aborted. at Microsoft.Office.Server.WebControls.AudienceLoader.UpdateAudienceRunTimeCheckHashs(Boolean loadAudiences, Boolean loadMemberships, Boolean loadSharePointGroups) at Microsoft.Office.Server.WebControls.AudienceLoader.EnsureCurrentUserAudienceIDs(Boolean loadAudiences, Boolean loadMemberships, Boolean loadSharePointGroups) at Microsoft.Office.Server.Audience.AudienceManager.IsCurrentUserInAudienceOf(AudienceLoader audienceLoader, String audienceTextRepresentation, Boolean showUntargetedAudience)


There were other logs with similar detail, all has something to do with Audience methods throwing errors. A check on the SharePoint log files provided a little bit of clue, but nothing that lights the bulb. Here's the snippet of the error logged under the category of User Profiles in MOSS log:

GetUserAudienceIDs::GetUserAudienceIDs() failed in SharePoint Group membership resolution (Exception Message : Accessor is invalid. StackTrace at Microsoft.SharePoint.Utilities.SPUtility.HandleAccessDenied(Exception ex) at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex) at Microsoft.SharePoint.Library.SPRequest.GetGroupsDataAsSafeArray(String bstrUrl, UInt32 dwGroupsScope, String bstrValue, UInt32 dwValue, UInt32& pdwColCount, UInt32& pdwRowCount, Object& pvarDataSet) at Microsoft.SharePoint.SPGroupCollection.InitGroups(Boolean fCustomUsers, String[] strNames, Int32[] groupIds) at Microsoft.SharePoint.SPGroupCollection.InitGroups() at Microsoft.SharePoint.SPGroupCollection.Undirty() at Microsoft.SharePoint.SPBaseCollection.System.Collections.IEnumerable.GetEnumerator() at Microsoft.Office.Server.Audience.AudienceManager.GetUserAudienceIDs(String accountName, SPWeb web, Boolean loadAudiences, Boolean loadSharePointGroups, Boolean loadMemberships). No SharePoint Group IDs will be returned.


Then I moved on to the IIS log files, and found that at the time of the error, a user is accessing the homepage. Immediately after that homepage request, several lines of log shows the user was being redirected to the /layouts/AccessDenied.aspx page. This pattern can be seen in several other occasions as well in other copy of the IIS log files.

2008-12-17 07:36:24 W3SVC45547621 172.25.67.84 GET /default.aspx - 443 PROD-AD01\uTester01 58.213.113.254 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 302 0 0 2008-12-17 07:36:27 W3SVC45547621 172.25.67.84 GET /_layouts/AccessDenied.aspx Source=https%3A%2F%2Fportal%2Eportal%2Ecom%2Fdefault%2Easpx 443 PROD-AD01\uTester01 58.213.113.254 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 200 0 0


After further investigation and testing, I found that the homepage is the only page that the portal has audience targeting configured. Several testing and monitoring was conducted and the conclusion is that this error will always be thrown whenever an unauthorized user attempts to load a MOSS page that has audience targeting configured. Since the error was thrown when the method IsCurrentUserInAudienceOf is invoked, this indicates that somehow MOSS will still perform audience checking even though the user doesn't have the privilege to access the portal.

I have not found any workaround to remove the error. If you found any without suppressing the logs from central admin do let me know :).

Friday, February 6, 2009

Performance Counters to trace for troubleshooting performance issue

I've been involve in some performance testing for a typical MOSS implementation lately. Although I have done these test many times on different projects, but I find that each performance test is unique, depending on the test objective, environment, the test subject (portal pages and components). Still, one thing that remain quite consistent is the performance counter to monitor. The following performance counter were used for the most recent performance test. I've included additional ASP.NET Application cache counters, as I want to verify whether the MOSS cache profile is working properly.

Counter Object

Counter

WFE

Index

SQL

Client

Remark

Processor (_Total)

% Processor Time

Y

Y

Y

Y

Not more than 70%

Memory

Available Bytes

Pages/Sec

Y

Y

Y

Y

Physical Disk

% Disk Time

Avg. Disk Queue Length

Y

Y

Network

Bytes Sent/Sec

Bytes Received/Sec

Bytes Total/Sec

Y

Y

Y

Y

http://technet.microsoft.com/en-us/library/aa996224.aspx

Bytes Total/Sec for 1000mbps NIC should not go over 70MB/s

Bytes Total/Sec for 100mbps NIC should not go over 7MB/s

ASP.NET Applications

Request Total

Requests/sec

Request Execution Time

Requests Succeeded

Request Rejected

Requests Timed Out

Requests Not Found

Requests Not Authorized

Output Cache Hits

Output Cache Misses

Y

Refer to http://msdn.microsoft.com/en-us/library/fxk122b4.aspx for description of ASP.NET performance counters.

I will include the SQL server performance counters later, as I do not have the information now (it was determined by my SQL-expert colleague)

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.

1.

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)

2.

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

a.

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

b.

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

3.

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.

4.

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

a.

Click Start, and then click Run.

b.

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

c.

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

d.

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

e.

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

f.

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

5.

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

6.

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

a.

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

b.

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"/>

c.

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

7.

Restart the server.

8.

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)

a.

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

b.

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

c.

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

d.

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

e.

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

9.

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)

a.

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

b.

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

c.

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.

References:

http://weblogs.asp.net/jan/archive/2004/05/19/135273.aspx

http://support.microsoft.com/kb/832809/en-us

http://www.ifiltershop.com/

http://www.foxitsoftware.com/pdf/ifilter/

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.