CSR-JSLink for SharePoint / Office 365

September 24, 2017

Topic: CSR-JSLink for SharePoint / Office 365
Audience: Executive
SCOPE: Brief

Click here to see CSR/JSLink presentation

Advertisements

SharePoint 2010 to SharePoint 2016, via SharePoint 2013-Workflow Crash

August 27, 2017

Problem:
Migration from SharePoint 2010 to SharePoint 2016, via SharePoint 2013 – Based on Native Approach.
(Assuming same for Migration from SharePoint 2013 to SharePoint 2016)
When workflow is opened in SharePoint Designer, it goes for crash screen as below.

Solution:
Open SP Designer, such that go to: All Files >> Workflows >> target workflow.


You will see following files related to Workflow, Open file with .oxml such that use : Open with: SharePoint Designer (as Text).
Checkout file.

Change assembly version from 14.0.0 to 16.0.0
Or for Migration from SharePoint 2013 to SharePoint 2016, change from 15.0.0 to 16.0.0
Save file, Check-in.
Now open workflow again. the crash screen, will not appear.

Also delete SharePoint Designer cache at following location.

C:\Users\UserName\AppData\Roaming\Microsoft\Web Server Extensions\Cache
C:\Users\your user name\AppData\Local\Microsoft\WebsiteCache


SharePoint 2016 Server-Unexpected Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage ‘DistributedLogonTokenCache’ – Exception ‘Microsoft.ApplicationServer.Caching.DataCacheException:

July 29, 2017

Problem:
SharePoint 2016 Server with multitier SharePoint farm deployment.
Getting following exceptions at regular intervals:

Unexpected Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage 'DistributedLogonTokenCache' - Exception 'Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.). Additional Information : The client was trying to communicate with the server : net.tcp://DEVWFECONVERGEN:22233    
 at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody, RequestBody reqBody)    
 at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCacheProperties(RequestBody request, IClientChannel channel)    
 at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName)    
 at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()'.
Secondly,
Token Cache: Failed to initialize SPDistributedSecurityTokenCache  Exception: 'Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.). Additional Information : The client was trying to communicate with the server : net.tcp://DEVWFECONVERGEN:22233    
 at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody, RequestBody reqBody)    
 at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCacheProperties(RequestBody request, IClientChannel channel)    
 at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName)    
 at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()    
 at Microsoft.SharePoint.DistributedCaching.SPDistributedCache..ctor(String name, TimeSpan timeToLive, SPDistributedCacheContainerType containerType, Boolean encryptData)    
 at Microsoft.SharePoint.IdentityModel.SPDistributedSecurityTokenCache..ctor(String name, TimeSpan timeToLive, SPDistributedCacheContainerType containerType, Boolean encrptyData, TimeSpan minimumTokenExpirationWindow)    
 at Microsoft.SharePoint.IdentityModel.SPDistributedSecurityTokenCacheInitializer.Init(Object state)'.

Solution:
Distributed Cache service The Distributed Cache service provides caching features in SharePoint Server 2013. The microblog features and feeds rely on the Distributed Cache to store data for very fast retrieval across all entities. The Distributed Cache service is built on Windows Server AppFabric, which implements the AppFabric Caching service. Windows Server AppFabric installs with the prerequisites for SharePoint Server 2013.

As soon as you use social features of SharePoint like Microblog (Newsfeed), Following, Likes or other stuff (Sharing. User Profile Features, etc.) you need the Distributed Cache service. No way around!
If you want to setup the User Profile Service successfully you need the Distributed Cache Service. No way around!
As wellt he Distributed Cache Service is needed or can be used for Security Trimming, OneNote access and Page load performance.
And the Distributed Cache service needs the AppFabric service which is installed on the SharePoint Server as soon as you install SharePoint Prerequisites.

When, App Fabric cache service is started, via control panel. It fails with following error.

Application: DistributedCacheService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.

Exception Info: System.UriFormatException
   at System.Uri.CreateThis(System.String, Boolean, System.UriKind)
   at Microsoft.ApplicationServer.Caching.ServiceConfigurationManager.InitializeThisHostData()
   at Microsoft.ApplicationServer.Caching.ServiceConfigurationManager..ctor()
   at Microsoft.ApplicationServer.Caching.VelocityWindowsService.StartService(Boolean)
   at Microsoft.ApplicationServer.Caching.VelocityWindowsService.StartServiceCallback(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

So, this error suggest URI is bad.
Issue:
NetBios name of Server was: DevWEFConvergen
Hostnames of server was: DEVWEFConvergence

Hostnames or NetBIOS names were used to provide a friendlier means of identifying servers or workstations.
NetBIOS names is based on an older protocol and should be used within a LAN only and registers itself on that network everytime that PC is powered up or rebooted using LMHOSTS, broadcasts or WINS to provide resolution of a NetBIOS hostname to it’s IP address. Thet are limited to 16 characters in length with 15 characters visible. NetBIOS names cannot be used as part of a doamin. The underscore character “_” is only used in NetBIOS names.
Hostnames TCP/IP based are resolved either with a static HOSTS file on your PC or from a DNS service. They typically are used as part of a domain. The hostname uses “-” instead of “_” as most DNS will reject this character and can be up to 255 characters in length.

From Windows 2000 on you can disable NetBIOS and your network will be a lot quieter. I would recommend acquiring some basic TCP/IP books which also cover NetBIOS and experiment with your systems. You wil really need two PC’s minimal and some sort of sniffer tool to understand. You can read all you want, but until you play with these two protocols it won’t really click. The NetBIOS name cannot be readily distinguished from a hostname until you get a domain established. I have only glossed over this question and I am sure others will throw in probably better explanations.
Solution:
First useful hint was Get-CacheHost output where the name was incorrect. Then solution was easy:
1. Export-CacheClusterConfig -Path \config.xml
2. Edit file and fix your hostname
3. Import-CacheClusterConfig -Path \config.xml
Start-CacheCluster


SharePoint 2016 Server-The ‘ListInternal’ attribute is not allowed.

July 29, 2017

Problem:
SharePoint 2016 Server, with multi-tier farm deployment.
While Saving a site as template (In Site settings) or Activating a site template as solution, ( In Solution gallery, Site settings), getting following error
Microsoft.SharePoint.SPException: Feature definition with Id bdb8014f-6948-43bb-b980-ce825274dd0c failed validation, file 'PS19 Project SiteListInstances\ElementsFields.xml', line 1005, character 265: The 'ListInternal' attribute is not allowed.
at Microsoft.SharePoint.Administration.SPSolutionPackage.FeatureXmlValidationCallback.XmlValidationCallBack(Object sender, ValidationEventArgs evtargs)
at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(String code, String arg)
at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String lName, String ns, XmlValueGetter attributeValueGetter, String attributeStringValue, XmlSchemaInfo schemaInfo)
at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String localName, String namespaceUri, XmlValueGetter attributeValue, XmlSchemaInfo schemaInfo)
at System.Xml.XsdValidatingReader.ValidateAttributes()
at System.Xml.XsdValidatingReader.ProcessElementEvent()
at System.Xml.XsdValidatingReader.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.XmlReader.IsStartElement()
at Microsoft.SharePoint.Utilities.SPUtility.XsdValidateXml(XmlTextReader xmlStreamReader, String friendlyName, String pathXsdFile, String tagExpectedRootNode, Int32 desiredPathVersion, ValidationEventHandler xsdValEventHandler)
at Microsoft.SharePoint.Administration.SPSolutionPackage.SolutionFile.ValidateFeatureXmlFile(String rootTagElement)
at Microsoft.SharePoint.Administration.SPSolutionPackage.AddFeatureElementsCore(XmlNodeList nodeList, String strFeatureDirRelativeToCabFile, Guid featureId, Dictionary`2 filesAdded)
at Microsoft.SharePoint.Administration.SPSolutionPackage.AddFeatureElements(XmlNode root, String strFeatureDirRelativeToCabFile, String strFeatureXmlFilename, Guid featureId)
at Microsoft.SharePoint.Administration.SPSolutionPackage.WspSolutionFeature.ProcessFeatureXml()
at Microsoft.SharePoint.Administration.SPSolutionPackage.InitSolutionFeatures(XmlNode root)
at Microsoft.SharePoint.Administration.SPSolutionPackage.ProcessSolutionManifest()
at Microsoft.SharePoint.Administration.SPSolutionPackage.Load()
at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.CreateSolutionPackage(SPRequest request, String name, String signature, Byte[] fileBytes)
at Microsoft.SharePoint.SPUserSolutionCollection.c__DisplayClass4.b__0()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPUserSolutionCollection.AddOrUpgrade(SPListItem item, SPUserSolution existingSolution)
at Microsoft.SharePoint.SPUserSolutionCollection.Add(Int32 solutionGalleryItemId)
at Microsoft.SharePoint.SPSolutionExporter.ExportWebToGallery(SPWeb web, String solutionFileName, String title, String description, ExportMode exportMode, Boolean includeContent, String workflowTemplateName, String destinationListUrl, Action`1 solutionPostProcessor, Boolean activateSolution)

Solution:
Opened the ‘wss.xsd’ file in the ‘C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\TEMPLATE\XML’ folder, and added the following line.

<xs:attribute name="ListInternal" type="xs:string" />

After search for line:

<xs:attribute name="List" type="xs:string" />

It need to be done in all Servers in case of multi-tier SharePoint farm.


Record Management in SharePoint

June 24, 2017

Presentation

Topic: Record Management in SharePoint
Scope: basic
Level: Executive

Click here to download presentation


SharePoint Central administration-The object UserProfileADImportJob Name=

June 24, 2017

Problem:
In SharePoint Central administration, while starting timer job to start synchronization from AD to Sharepoint, following error is thorwn.
An update conflict has occurred, and you must re-try this action. The object UserProfileADImportJob Name=SharePoint Production 2016 User Profile Service Application_UserProfileADImportJob was updated by XXXDomain\xxxUser, in the OWSTIMER (1920) process, on machine XXXMachineName. View the tracing log for more information about the conflict.
Solution:
Clearing the SharePoint Configuration Cache as per guide here:
https://www.zubairalexander.com/blog/clearing-the-sharepoint-configuration-cache/


After migration from SharePoint 2010 to SharePoint 2013 , to SharePoint 2016, search does not work.

May 14, 2017

Case:
Windows Server 2016 + SharePoint 2016 +SQL Server 2016
1 App Server + 1 Web front end
Issue:
After migration from SharePoint 2010 to SharePoint 2013 , to SharePoint 2016, search does not work.
Search throws exception as:
System.ServiceModel.FaultException: An error occurred when verifying security for the message. --- End of inner exception stack trace --- Server stack trace: at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout) at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request

Advance search throws object null exception as :
AdvancedSearchBox class encountered unexpected error: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Office.Server.Search.Query.ConsumerScopeCache.GetScopes() at Microsoft.Office.Server.Search.Query.ScopeCache.GetSharedScopes() at Microsoft.Office.Server.Search.WebControls.AdvancedSearchBox.GetScopeEnumerator(ScopeInformation& defaultScope) at Microsoft.Office.Server.Search.WebControls.AdvancedSearchBox.CreateScopeRows(Table parentTable) at Microsoft.Office.Server.Search.WebControls.AdvancedSearchBox.CreateScopingSectionChildControls(Table parentTable) at Microsoft.Office.Server.Search.WebControls.AdvancedSearchBox.CreateChildControls().

Solution:
Tried following checklist as:

    verified that the SharePoint Web Services site existed in IIS, and that SecurityTokenServiceApplication existed as a virtual directory.
    Related application pool that are working
    Created new Search Service application and changed the association.
    Done a full crawl
    Did index reset

Run SharePoint configuration wizard again.
Finally, issue was related to time difference b/w application server and Web front end.
They were in different time zone. Fixed time zones, all above exceptions solved.