Tags » AppFabric

Distributed Cache service warning in Sharepoint 2013

When the server farm is first configured, the server farm account is set as the service account of the AppFabric Caching service. The Distributed Cache service depends on the AppFabric Caching service. 164 more words

SharePoint

AppFabric Installation Issue

 

Recently in one of the projects involving SharePoint 2013, AppFabric and Windows Workflow 4.5 we faced an interesting issue while installing\configuring AppFabric. Every time the installer would run for a while and then error out with the following message: 234 more words

SharePoint 2013

AppFabric Architecture

The Distributed Cache Service

SharePoint’s distributed caches are hosted and maintained by the Distributed Cache Service, itself a thin wrapper over a Windows Server AppFabric cluster. 4,031 more words

For

AppFabric Contept in Sharepoint 2013

To assist with scaling and performance, SharePoint 2013 utilizes Windows Server AppFabric to maintain an in-memory cache of frequently-used data. While this in-memory cache achieves its goals and does improve scalability, it also adds another service to maintain to SharePoint’s long list of supporting elements. 3,705 more words

For

SharePoint 2013 AppFabric Installation Error

when you try to install SP2013 in offline mode all Prerequisites installation success but AppFabric Not ! so let’s try to solve this Problem.

copy the source files of SharePoint to c:\SP2013 and copy the Prerequisites to the Prerequisites folder… 41 more words

Hyper-V

SharePoint 2013 Distributed Cache: Boon or Bane

SharePoint 2013’s Distributed Cache is one of my favorite feature of SharePoint 2013. Finally SP2013 moving into the realm of memory based storage for faster access(in lines of MemCache). 906 more words

SharePoint 2013

AppFabric

using System;
using Microsoft.ApplicationServer.Caching;
using System.Text;
using System.Security.Cryptography;
using System.Collections.Specialized;
using System.Configuration;
using System.Collections.Generic;
using System.Diagnostics;
using System.Data;

namespace AppFabric
{
public enum CacheType
{
AppCache = 0,
UserCache = 1
}

public class AppFabricCache
{
private static Dictionary<CacheType, DataCache> Cache = null;
private static DataCacheFactory _factory = null;

private CacheType _cacheType;
private DataCache _cache
{
get
{
return Cache;
}
}

public AppFabricCache(CacheType CacheType = CacheType.AppCache)
{
CreateCache();
_cacheType = CacheType;
}

private void CreateCache()
{
try
{

if (_factory == null)
{
_factory = new DataCacheFactory();
}

if (Cache == null || Cache.Count == 0)
{
NameValueCollection config = (NameValueCollection)ConfigurationManager.GetSection("AppFabricParameters");
Cache = new Dictionary<CacheType, DataCache>();
Cache.Add(CacheType.UserCache, _factory.GetCache(config));
Cache.Add(CacheType.AppCache, _factory.GetCache(config));
}
}
catch (Exception e)
{
//failed to create cache
}
}

<!--more-->public object GetFromCache(string key)
{
object obj = null;
try
{
obj = _cache.Get(key);
}
catch (Exception e)
{
//write to logger ("Object not in cache", e.InnerException);
}
return obj;
}

public bool GetTableFromCache(string key, out DataTable dt)
{
dt = null;
try
{
dt = _cache.Get(key) as DataTable;
}
catch (Exception e)
{
return false;
//write to logger ("Object not in cache", e.InnerException);
}
if(dt==null)
{
return false;
}
return true;
}

public void PutInCache(string key, object obj)
{
//TracingLibrary.TraceEvents.AddEvent("Inside Put in Cache");
try
{
_cache.Put(key, obj);
}
catch (Exception e)
{
//write to logger ("Exception putting in cache", e.InnerException)
}
}

public string GetKey()
{

StringBuilder sb = new StringBuilder();

StackFrame frame = new StackFrame(1);
if (frame != null)
{
var method = frame.GetMethod();
sb.Append(method.DeclaringType.FullName + "_");
sb.Append(method.Name);
}

return sb.ToString();
}

public void PutInCache(string key, object obj, TimeSpan tspan)
{
//TracingLibrary.TraceEvents.AddEvent("Inside Put in Cache");
try
{
_cache.Put(key, obj, tspan);
}
catch (Exception e)
{
//write to logger ("Exception putting in cache", e.InnerException);
}
}

public void ResetObjectTimeoutWrapper(string key, TimeSpan newTimeout)
{
//TracingLibrary.TraceEvents.AddEvent("Inside ResetObjectTimeoutWrapper");
try
{
_cache.ResetObjectTimeout(key, newTimeout);
}
catch (Exception e)
{
//write to logger ("Exception occured in cache", e.InnerException);
}
}

public string GetEncryptedKey(string key)
{
MD5 md5Hasher = MD5.Create();
byte[] data = md5Hasher.ComputeHash(Encoding.Default.GetBytes(key.ToString().Trim()));
Guid keyVal = new Guid(data);
return keyVal.ToString();
}

}
} 7 more words
Appfabric