Wednesday, October 27, 2010

Remove unnecessary or orphaned Service Application Pool for SharePoint 2010 Service Application


If you have created and deleted several service applications in SharePoint 2010, you will see that deleting the service application doesn't automatically delete an application pool associated with the service application. If you do not plan to re-use the application pool, here is how to get rid of such unnecessary/orphaned application pool using PowerShell.

  1. Launch SharePoint 2010 Management Shell on any one of your SharePoint servers.
  2. In order to enumerate all existing application pools that were created for existing and existed service application, run Get-SPServiceApplicationPool as shown below.
  3. As shown in the picture, I have 3 application pools for Managed Metadata Service and to delete 2 unnecessary application pools, I need to run Remove-SPServiceApplicationPool command as shown below.

One thing to keep in mind here when you run Remove-SPServiceApplicationPool command is that -Identity parameter is not any GUID or ID for the specific service application or application pool, but it's rather the application pool name that can be obtained by running Get-SPServiceApplicationPool. This will help you maintain your SharePoint environment cleaner. Good luck!
    

Friday, October 8, 2010

User Profile Service Application with Forefront Identity Manager Event ID 3 in SharePoint 2010


One of my SharePoint 2010 environment started to throwing a bunch of errors at one point regarding Forefront Identity Manager (Event ID 3). The error message is as followed:


Log Name:      Application
Source:        Forefront Identity Manager
Date:          9/29/2010 2:13:35 AM
Event ID:      3
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      [SP_server].[domain].com
Description:
Microsoft.ResourceManagement.Service: Microsoft.ResourceManagement.Workflow.Hosting.WorkflowManagerException: Forefront Identity Management Service does not support workflows of type 'Microsoft.ResourceManagement.Workflow.Activities.SequentialWorkflow, Microsoft.ResourceManagement, Version=4.0.2450.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at Microsoft.ResourceManagement.Workflow.Hosting.HostActivator.ActivateHost(ResourceManagementWorkflowDefinition workflowDefinition)
   at Microsoft.ResourceManagement.Workflow.Hosting.WorkflowManager.StartWorkflowInstance(Guid workflowInstanceIdentifier, KeyValuePair`2[] additionalParameters)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Forefront Identity Manager" />
    <EventID Qualifiers="0">3</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2010-09-29T07:13:35.000000000Z" />
    <EventRecordID>69280</EventRecordID>
    <Channel>Application</Channel>
    <Computer>[SP_server].[domain].com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Microsoft.ResourceManagement.Service: Microsoft.ResourceManagement.Workflow.Hosting.WorkflowManagerException: Forefront Identity Management Service does not support workflows of type 'Microsoft.ResourceManagement.Workflow.Activities.SequentialWorkflow, Microsoft.ResourceManagement, Version=4.0.2450.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at Microsoft.ResourceManagement.Workflow.Hosting.HostActivator.ActivateHost(ResourceManagementWorkflowDefinition workflowDefinition)
   at Microsoft.ResourceManagement.Workflow.Hosting.WorkflowManager.StartWorkflowInstance(Guid workflowInstanceIdentifier, KeyValuePair`2[] additionalParameters)</Data>
  </EventData>
</Event>


Locating the problem....Just like other people, I have searched everywhere to identify the real problem but most of the people were having a problem during trying to get the User Profile Service Sychronization job started. My issue was different from these because my environment was perfectly working fine without any issue. After I got this error, I went back and traced what was done to the SharePoint servers. I realized that I downloaded SharePoint 2010 Auguest 2010 Cumulative Update (CU) and ever since both CUs for Foundation and Server 2010 have been successfully installed, I started getting the error messges.


Solving the problem.....So, I created a farm backup and tried deleteing a SA for User Profile Service and re-created it. If you have My Sites created by your end-users, the My Sites will not be accessible until you re-create the SA (and don't worry, all contents in My Sites will still remain the same even though they look like they are gone). You should also expect that any profile edits made by individuals on their My Profile will be wiped out. After I re-created the SA for the User Profile Service, my error messages gone and my server shows no error. If you run into this similar problem and have a trouble getting the User Profile Service re-created or re-configured, please leave a comment! Good luck!