SharePoint 2016, Sharepoint 2013, Sharepoint 2010, Windows Server 2012, Sql Server 2012,2014,IIS, Active Directory,User Profile Service, Managed MetaData Service, Search Service, Topology, Web Application, IIS, Site collection, List, Library, PowerShell, office web app, Windows Authentication, NTLM, Kerberos, Saml, ADFS, Active Directory Import, MIM, Don’t use default Distributed Cache of SharePoint 2013 for your Custom Application – SharePoint

Don’t use default Distributed Cache of SharePoint 2013 for your Custom Application

In a situation, where you want to take advantage of the SharePoint 2013 AppFabric Cache Cluster (known as Distributed Cache) for you custom application or you trying to use the AppFabric for your development. Fine, you wrote the custom application and trying to store your custom objects in Cache Cluster. Boom you ends up an error. i.e this piece of code .GetDefaultCache()

Error: Cache referred to does not exist. Contact administrator or use the Cache administration tool to create a Cache.

A lot of folks like me having this issue many times and don’t know how to fix it. After research and carefully reading the Technet Article I found this:

“If you are using custom applications in SharePoint Server 2013 which use the AppFabric client APIs, or are creating custom caches, you should create a separate AppFabric cache cluster to support your custom applications. Do not use the AppFabric cache cluster supporting your SharePoint Server 2013 farm. Run your separate AppFabric cache cluster for your custom applications on separate servers from the servers dedicated to your SharePoint Server 2013 farm.”

You kidding me but that is what it is…this is not supported.

Microsoft has stated that additional named caches should not be deployed to the SharePoint AppFabric cluster (i.e. by using the New-AFCache cmdlet). If you need a cache for a custom solution, you’ll need to deploy a separate AppFabric cluster (or server) and create the cache there. Then point your solution at the external AppFabric cluster. There’s also no supported way to add your own cached items to SharePoint’s named caches

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *