Wednesday, May 27, 2015

Request Management Service missing?

"Request Management" Service is missing on one SharePoint server? How to start it there?

This may sound silly...... what we need to do is simple: start "Microsoft SharePoint Foundation Web Application" service on that server, then "Request Management" Service will appear, then we can start it up.

It seems that "Request Management" Service is bound to "Microsoft SharePoint Foundation Web Application" service.

Hope this tip can save you 10 minutes :-)

Monday, May 18, 2015

SharePoint is on the wrong way

SharePoint 2016 is coming. Tons of new features.

But none of them really make business users excited.

Actually, in my opinion, even the cloud version "SharePoint Online" is not so attractive.

Let me share my thoughts a bit here.

SharePoint is designed for enterprise collaboration. It helps users to organize information. It's so flexible and UI friendly, SharePoint 2007 was really impressive.

A big bonus is the integration with MS Office suite. We can contribute and manage information at the same platform.

But that's it. After that, I don't see any GREAT feature.

"Wait!", you might ask, "What about the new features of SharePoint 2010 and SharePoint 2013?"

Yes, there are a lot of new features, but none of them are GREAT.

Here is an analogy. Upgrading file system from FAT32 to NTFS, we can get enormous advantages, but that doesn't mean much to business users.

Same to "cloud computing". If it works fine, do users really care whether the system is based on cloud or on-premise? They don't.

I agree that Windows 8 is much better than Windows XP, But, let's face it. If Windows XP still had main stream support, then millions of companies would stick to it. Why? Because there is no GREAT new feature in Windows 8!

What features that SharePoint really needs? The first three features appeared in my mind are: Calendar. Trello. Slack.

There is calendar list in SharePoint, but, it's too hard to combine it with "information management".

Same with Trello and Slack. SharePoint has similar basic elements, but it's too hard to use the OOTB functionality to replace Trello or Slack.

In one word: Microsoft need to focus on "business feature" instead of "technical feature".

I wish SharePoint 2016 can give the world more surprise!


(Any comments are welcome.)

Tuesday, April 21, 2015

Problem: Workflow is not started by the first event

The workflow is not started by the first event ("item created" or "item changed"), after that it works well.

It only happens in one site collection.

Soon I found the error message in ULS: "The requested workflow task content type was not found on the SPWeb"

Google search leads to this post. But re-creating Tasks list didn't resolve the problem in my case. The other posts all recommend to reactivate "OffWFCommon" feature. But it still didn't help.

Then I realized where the problem is.

SharePoint structure is based on "template". From the error message in ULS, it's easy to guess that the site content type "Tasks" is corrupted somewhere. Reactivating "OffWFCommon" feature only fixes the site content type template, not the content type instance in the Tasks list.

So the solution is simple.

1. Reactivate "OffWFCommon" feature

stsadm -o deactivatefeature -filename OffWFCommon\feature.xml -url http://sp.domain.local/sites/site1
stsadm -o activatefeature -filename OffWFCommon\feature.xml -url http://sp.domain.local/sites/site1

2. Rebuild "Tasks" list


Any comments welcome!

Wednesday, April 1, 2015

How to enable "Asset library" template

After creating a new site collection based on "Blank" site template, I noticed that "Asset library" template is not there. Then I enabled "SharePoint Server Standard Site Collection features" and "SharePoint Server Standard Site features", with no luck. Then "Wiki Page Home Page" feature, still no luck.

Internet search brings me to this post, and a few other similar posts, which all says that we need to enable "SharePoint Server Publishing Infrastructure". I am pretty sure that would work. However, "Publishing" feature is really a big chunk of stuff, and we lose "save as template" functionality after enabling it. I don't want to do that.

Thanks for the post All SharePoint Features, we can simply enable "Asset Library" feature, through the PowerShell script below.

# 4bcccd62-dcaf-46dc-a7d4-e38277ef33f4
Enable-SPFeature -identity "AssetLibrary" -URL "http://SiteCollectionUrl.company.local"



Monday, March 30, 2015

The main causes of failing to enable publishing feature

Last year I submitted a post regrading how to properly disable/re-enable publishing feature. That's not the silver bullet, however.

Recently I got some more trouble shooting tasks. The error message appeared (attached below), when site collection administrators failed to enable publishing feature. After some investigation, I found there were a few possible problems.

1. Some (hidden) OOTB site columns are missing.

2. Some (hidden) OOTB site content types are missing.

3. Some (hidden) content types which are part of publishing feature are assigned to hidden document library, before enabling publishing feature.

4. Some (hidden) document libraries or lists are missing.

These are all caused by disabling publishing feature improperly.  I recommend to rebuild the site collection. But, if really necessary, it's still possible to fix the problem manually.


ULS log:

SPContentTypeBindingElement.ElementActivated(). An error occurred binding content type '0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811' to list '/sites/ONEBRAND/_catalogs/masterpage' on web 'http://projectsqa.domain.local/sites/ONEBRAND'.  Exception 'A duplicate content type "Page Layout" was found.'.

Publishing Resources Feature activation failed. Exception: Microsoft.SharePoint.SPException: Provisioning did not succeed. Details: Failed to create the '_catalogs/masterpage' library. OriginalException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.    
 at Microsoft.SharePoint.Publishing.PublishingSite.GetPageLayouts(Boolean excludeObsolete)    
 at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.ConfigureMasterPageGallery(SPList cacheProfiles)     -
 -- End of inner exception stack trace ---    
 at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.ConfigureMasterPageGallery(SPList cacheProfiles)    
 at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.b__0()    
 at Microsoft.Office.Server.Utilities.Security.SecurityUtilities.RunWithAllowUnsafeUpdates(SPWeb web, Action secureCode)    
 at Microsoft.SharePoint.Publishing.CmsSecurityUtilities.RunWithAllowUnsafeUpdates(SPWeb web, CodeToRun secureCode)    
 at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.Provision()    
 at Microsoft.SharePoint.Publishing.PublishingResourcesFeatureHandler.<>c__DisplayClass3.b__0()    
 at Microsoft.Office.Server.Utilities.CultureUtility.RunWithCultureScope(CodeToRunWithCultureScope code)    
 at Microsoft.SharePoint.Publishing.CmsSecurityUtilities.RunWithWebCulture(SPWeb web, CodeToRun webCultureDependentCode)    
 at Microsoft.SharePoint.Publishing.PublishingResourcesFeatureHandler.FeatureActivated(SPFeatureReceiverProperties receiverProperties).

Feature receiver assembly 'Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c', class 'Microsoft.SharePoint.Publishing.PublishingResourcesFeatureHandler', method 'FeatureActivated' for feature 'aebc918d-b20f-4a11-a1db-9ed84d79c87e' threw an exception: Microsoft.SharePoint.SPException: Provisioning did not succeed. Details: Failed to create the '_catalogs/masterpage' library. OriginalException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.    
 at Microsoft.SharePoint.Publishing.PublishingSite.GetPageLayouts(Boolean excludeObsolete)    
 at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.ConfigureMasterPageGallery(SPList cacheProfiles)     -
 -- End of inner exception stack trace ---    
 at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.ConfigureMasterPageGallery(SPList cacheProfiles)    
 at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.b__0()    
 at Microsoft.Office.Server.Utilities.Security.SecurityUtilities.RunWithAllowUnsafeUpdates(SPWeb web, Action secureCode)    
 at Microsoft.SharePoint.Publishing.CmsSecurityUtilities.RunWithAllowUnsafeUpdates(SPWeb web, CodeToRun secureCode)    
 at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.Provision()    
 at Microsoft.SharePoint.Publishing.PublishingResourcesFeatureHandler.<>c__DisplayClass3.b__0()    
 at Microsoft.Office.Server.Utilities.CultureUtility.RunWithCultureScope(CodeToRunWithCultureScope code)    
 at Microsoft.SharePoint.Publishing.CmsSecurityUtilities.RunWithWebCulture(SPWeb web, CodeToRun webCultureDependentCode)    
 at Microsoft.SharePoint.Publishing.PublishingResourcesFeatureHandler.FeatureActivated(SPFeatureReceiverProperties receiverProperties)    
 at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)

Windows events log:

Event log message was: 'Failed to create the '_catalogs/masterpage' library.'. Exception was: 'System.NullReferenceException: Object reference not set to an instance of an object.    
 at Microsoft.SharePoint.Publishing.PublishingSite.GetPageLayouts(Boolean excludeObsolete)    
 at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.ConfigureMasterPageGallery(SPList cacheProfiles)'




Customize Access Denied page for all Web Application Alternative Urls

We can customize Access Denied page for a web application through PowerShell script below.

$site = get-spsite "http://intranet.company.local"
$webApp = $site.WebApplication
$webApp.UpdateMappedPage(1, "/_layouts/MyAccessDenied.aspx")
$webApp.Update()

However, there is one problem.

Users may access the site without domain name, such as "http://intranet". In that case, the customized Access Denied page is ignored, and users will see the OOTB page.

How to fix this issue? We have two options.

1. Create a separate zone for the web application, specify "intranet" in Host Header.



2. In IIS Site Bindings, add "Intranet" to the site.


Which one is better?  It depends on how many WFE servers are there, and how much RAM a WFE server has, and, whether the SharePoint Administrator want to modify IIS settings manually.

Wednesday, February 18, 2015

SharePoint 2010 - User Profile Synchronization - "Unable to process Put message"

I got this error quite a few times before, when trying to configure User Profile Synchronization Connection. Normally it's caused by permission issue, as this post explained.

This time it's different.

After some investigation, I think that resetting Sync DB may fix the problem. But what's wrong with that database?

In windows events log, I found the error message attached at the end of this post. The highlight part says, "Cannot insert duplicate key row in object 'dbo.mms_partition' with unique index 'IX_mms_partitionma_idpartition_name'. The duplicate key value is (f6faef68-af32-4387-ad64-aed58ba98394, DC=pw2,DC=local)"

I cannot believe that I missed it at the very beginning!

Run SQL Query "SELECT * FROM [SP_SyncDB].[dbo].[mms_partition]" on SharePoint database server, it's clear that "f6faef68-af32-4387-ad64-aed58ba98394" is already there in the field "ma_id". 

My guess is, for some unknown reason, SharePoint User Profile Service tries to create a new "Connection" instead of utilizing existing one.

So I deleted the existing User Profile Synchronization Connection through Central Admin site, then recreated it.

It works well. :-)

============= Error message in windows events log ==============

The server encountered an unexpected error while performing an operation for a management agent.

 "ERR: MMS(4596): sql.cpp(5714): Query (insert into [mms_partition] ([ma_id],[partition_id],[partition_name],[version_number],[ma_custom_data_xml],[is_selected],[filter_xml],[filter_hints_xml],[creation_date],[modification_date],[allowed_operations_flag],[current_export_batch_number],[current_export_sequence_number],[last_successful_export_batch_number]) values ( 'F6FAEF68-AF32-4387-AD64-AED58BA98394','F54CA4AE-2FFA-4517-BF61-7173795CE0B5',N'DC=pw2,DC=local',1,N'DC=pw2,DC=localpw2.local{901bed2e-5007-4849-8904-1b868995a6b6}1101',1,N'

  contact
  container
  domainDNS
  group
  inetOrgPerson
  user
  crossRef
  organizationalUnit


 
   CN=Computers,DC=pw2,DC=local
   OU=Domain Controllers,DC=pw2,DC=local
   CN=ForeignSecurityPrincipals,DC=pw2,DC=local
   CN=Managed Service Accounts,DC=pw2,DC=local
   OU=Microsoft Exchange Security Groups,DC=pw2,DC=local
   CN=Microsoft Exchange System Objects,DC=pw2,DC=local
   CN=Program Data,DC=pw2,DC=local
   CN=System,DC=pw2,DC=local
   CN=Builtin,DC=pw2,DC=local
   CN=Infrastructure,DC=pw2,DC=local
   CN=LostAndFound,DC=pw2,DC=local
   CN=NTDS Quotas,DC=pw2,DC=local
   CN=TPM Devices,DC=pw2,DC=local
   DC=ForestDnsZones,DC=pw2,DC=local
   DC=DomainDnsZones,DC=pw2,DC=local
   CN=Configuration,DC=pw2,DC=local
 
 
   CN=Users,DC=pw2,DC=local
 


',N'

 
   contact
   
    top
    person
    organizationalPerson
    contact
 
   1
 
 
   container
   
    top
    container
 
   1
 
 
   domainDNS
   
    top
    domain
    domainDNS
 
   1
 
 
   group
   
    top
    group
 
   1
 
 
   inetOrgPerson
   
    top
    person
    organizationalPerson
    user
    inetOrgPerson
 
   1
 
 
   user
   
    top
    person
    organizationalPerson
    user
 
   1
 
 
   crossRef
   
    top
    crossRef
 
   1
 
 
   organizationalUnit
   
    top
    organizationalUnit
 
   1
 
 
   msExchTransportSettings
   
    top
    container
    msExchTransportSettings
 
   0
 
 
   msImaging-PSPs
   
    top
    container
    msImaging-PSPs
 
   0
 
 
   msExchProtocolCfgProtocolContainer
   
    top
    container
    msExchProtocolCfgProtocolContainer
 
   0
 
 
   msExchMDBContainer
   
    top
    container
    msExchMDBContainer
 
   0
 
 
   msExchProtocolCfgHTTPFilters
   
    top
    container
    msExchProtocolCfgHTTPFilters
 
   0
 
 
   msExchAddressListServiceContainer
   
    top
    container
    msExchAddressListServiceContainer
 
   0
 
 
   msExchInformationStore
   
    top
    container
    msExchInformationStore
 
   0
 
 
   msExchOmaDeviceType
   
    top
    container
    msExchOmaDeviceType
 
   0
 
 
   msExchContainer
   
    top
    container
    msExchContainer
 
   0
 
 
   msExchAvailabilityConfig
   
    top
    container
    msExchAvailabilityConfig
 
   0
 
 
   msExchOmaConfigurationContainer
   
    top
    container
    msExchOmaConfigurationContainer
 
   0
 
 
   msExchAdvancedSecurityContainer
   
    top
    container
    msExchAdvancedSecurityContainer
 
   0
 
 
   msExchPublicFolderTreeContainer
   
    top
    container
    msExchPublicFolderTreeContainer
 
   0
 
 
   msExchStorageGroup
   
    top
    container
    msExchStorageGroup
 
   0
 
 
   msExchAddressRewriteConfiguration
   
    top
    container
    msExchAddressRewriteConfiguration
 
   0
 
 
   msExchOmaContainer
   
    top
    container
    msExchOmaContainer
 
   0
 
 
   msExchOmaDataSource
   
    top
    container
    msExchOmaDataSource
 
   0
 
 
   msExchOmaDeliveryProvider
   
    top
    container
    msExchOmaDeliveryProvider
 
   0
 
 
   msExchChatVirtualNetwork
   
    top
    container
    msExchChatVirtualNetwork
 
   0
 
 
   msExchContentConfigContainer
   
    top
    container
    msExchContentConfigContainer
 
   0
 
 
   msExchTransportRuleCollection
   
    top
    container
    msExchTransportRuleCollection
 
   0
 
 
   rpcContainer
   
    top
    container
    rpcContainer
 
   0
 
 
   msExchReplicationConnectorContainer
   
    top
    container
    msExchReplicationConnectorContainer
 
   0
 
 
   msExchChatNetwork
   
    top
    container
    msExchChatNetwork
 
   0
 
 
   msExchServersContainer
   
    top
    container
    msExchServersContainer
 
   0
 
 
   msExchRoutingGroupContainer
   
    top
    container
    msExchRoutingGroupContainer
 
   0
 
 
   msExchPoliciesContainer
   
    top
    container
    msExchPoliciesContainer
 
   0
 
 
   msExchConnectors
   
    top
    container
    msExchConnectors
 
   0
 
 
   msExchMDBAvailabilityGroupContainer
   
    top
    container
    msExchMDBAvailabilityGroupContainer
 
   0
 
 
   msExchProtocolCfgSMTPIPAddressContainer
   
    top
    container
    msExchProtocolCfgSMTPIPAddressContainer
 
   0
 
 
   msExchMonitorsContainer
   
    top
    container
    msExchMonitorsContainer
 
   0
 
 
   msExchIMGlobalSettingsContainer
   
    top
    container
    msExchIMGlobalSettingsContainer
 
   0
 
 
   msExchConfigurationContainer
   
    top
    container
    msExchConfigurationContainer
 
   0
 
 
   msExchOmaCarrier
   
    top
    container
    msExchOmaCarrier
 
   0
 
 
   msExchOmaDeviceCapability
   
    top
    container
    msExchOmaDeviceCapability
 
   0
 
 
   msExchProtocolCfgSharedContainer
   
    top
    container
    msExchProtocolCfgSharedContainer
 
   0
 
 
   msExchSystemObjectsContainer
   
    top
    container
    msExchSystemObjectsContainer
 
   0
 
 
   msExchAdminGroupContainer
   
    top
    container
    msExchAdminGroupContainer
 
   0
 
 
   msExchRoutingGroup
   
    top
    container
    msExchRoutingGroup
 
   0
 
 
   groupPolicyContainer
   
    top
    container
    groupPolicyContainer
 
   0
 
 
   msExchOrganizationContainer
   
    top
    container
    msExchOrganizationContainer
 
   0
 
 
   msExchConferenceContainer
   
    top
    container
    msExchConferenceContainer
 
   0
 
 
   computer
   
    top
    person
    organizationalPerson
    user
    computer
 
   0
 
 
   msPKI-Key-Recovery-Agent
   
    top
    person
    organizationalPerson
    user
    msPKI-Key-Recovery-Agent
 
   0
 
 
   msExchDepartment
   
    top
    organizationalUnit
    msExchDepartment
 
   0
 


','2015-02-17 23:23:17.924','2015-02-17 23:23:17.924',1073741854,1,0,0)) performed with error
ERR: MMS(4596): sql.cpp(5767): The statement has been terminated.
ERR: MMS(4596): sql.cpp(5775): hrError: 0x80040e2f, dwMinor: 3621
ERR: MMS(4596): sql.cpp(5930): SQL error: 01000, native: 3621
ERR: MMS(4596): sql.cpp(5767): Cannot insert duplicate key row in object 'dbo.mms_partition' with unique index 'IX_mms_partitionma_idpartition_name'. The duplicate key value is (f6faef68-af32-4387-ad64-aed58ba98394, DC=pw2,DC=local).
ERR: MMS(4596): sql.cpp(5775): hrError: 0x80040e2f, dwMinor: 2601
ERR: MMS(4596): sql.cpp(5930): SQL error: 23000, native: 2601
BAIL: MMS(4596): sql.cpp(3742): 0x80040e2f
BAIL: MMS(4596): sql.cpp(3639): 0x80040e2f
BAIL: MMS(4596): partition.cpp(2095): 0x80040e2f
BAIL: MMS(4596): mastate.cpp(4605): 0x80040e2f
BAIL: MMS(4596): ma.cpp(1521): 0x80040e2f
Forefront Identity Manager 4.0.2450.49"