Windows Server AppFabric 缓存
我目前正在开发一个 ASP.NET MVC 站点,我们必须在部分信任的情况下运行。 现在,我在处于高信任状态时遇到连接到 AppFabric 的问题。完全信任运行时没有问题。我的 web_hightrust.config 文件需要什么权限。
失败的方法如下所示:
[SecuritySafeCritical]
[PermissionSet(SecurityAction.Assert, Unrestricted = true)]
private static DataCacheFactory InitializeFactory()
{
try
{
DataCacheFactoryConfiguration configuration = GetDataCacheFactoryConfiguration();
Logger.Debug("Initializing a DataCacheFactory");
DataCacheFactory factory = new DataCacheFactory(configuration);
return factory;
}
catch (Exception ex)
{
Logger.ErrorFormat("Construction of factory failed: {0}", ex.ToString());
throw;
}
}
正如您所看到的,我已经用我认为足以建立连接的内容注释了该方法,但它失败了。
任何想法表示赞赏。
I'm currently working on a ASP.NET MVC site where we have to run in partial trust.
Now I'm facing a problem with connecting to AppFabric when in High Trust. No problems when running in full trust. What Permission do I need in my web_hightrust.config file.
The method failing looks like this:
[SecuritySafeCritical]
[PermissionSet(SecurityAction.Assert, Unrestricted = true)]
private static DataCacheFactory InitializeFactory()
{
try
{
DataCacheFactoryConfiguration configuration = GetDataCacheFactoryConfiguration();
Logger.Debug("Initializing a DataCacheFactory");
DataCacheFactory factory = new DataCacheFactory(configuration);
return factory;
}
catch (Exception ex)
{
Logger.ErrorFormat("Construction of factory failed: {0}", ex.ToString());
throw;
}
}
As you can see I have annotated the method with what I think should be enough to make the connection, but it fails.
Any ideas appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案是:
AppFabric 正在使用 WCF 和 net.tcp,这需要完全信任。
我一直在与 AppFabric Cache 的主要开发负责人进行沟通,他告诉我,他们将在未来版本中研究这一点。
因此,就目前而言,请根据您的安全需求考虑是否可以在您的环境中使用 AppFabric 缓存。
http://msdn.microsoft.com/en-us/library/bb412186.aspx
/托尼
The answer is:
AppFabric is using WCF with net.tcp which requires full trust.
I have been communicating with a principal development lead in the AppFabric Cache, and he told me that this is something that they will look into as part of a future release.
So as for now, please consider if AppFabric Caching can be utilized in your environment considering the security demands you have.
http://msdn.microsoft.com/en-us/library/bb412186.aspx
/Tonni