cache and web-farm
- by user285336
I need to deploy my web-application on web-farm.
Application has the following strings:
public static X509Certificate2 GetIdCertificate()
{
string cacheKey = "Neogov.Insight.IdentityProvider.PrivateKey";
if (HttpContext.Current.Cache[cacheKey] == null)
{
//Load new.
HttpContext.Current.Cache[cacheKey] = new X509Certificate2(
System.Web.HttpContext.Current.Server.MapPath("~/") + "\\ID\\" +
Neogov.Insight.IdentityProvider.BLL.IdConfig.Instance.IdPKeyFile,
Neogov.Insight.IdentityProvider.BLL.IdConfig.Instance.IdPKeyPassword,
X509KeyStorageFlags.MachineKeySet);
}
return (X509Certificate2)HttpContext.Current.Cache[cacheKey];
}
will it work or not? If not then how to solve and what is solution?
Thanks