Windows Server AppFabric 缓存

发布于 2024-12-14 13:04:38 字数 844 浏览 5 评论 0原文

我目前正在开发一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

腹黑女流氓 2024-12-21 13:04:39

答案是:

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文