【问题标题】:MVCContrib Partially Trusted Assembly Security Error on Deployment部署时 MVCContrib 部分受信任的程序集安全错误
【发布时间】:2010-12-03 15:53:50
【问题描述】:

我正在我的应用程序中实现 MVCContrib 的 Castle ControllerFactory。它似乎在我的本地机器上运行良好,但它在我的 Web 服务器(MS Server 2008)上抛出 SecurityExceptions。

 [SecurityException: That assembly does not allow partially trusted callers.]
   MvcContrib.Castle.WindsorExtensions.RegisterControllers(IWindsorContainer container, Type[] controllerTypes) +0
   MvcContrib.Castle.WindsorExtensions.RegisterControllers(IWindsorContainer container, Assembly[] assemblies) +36
   InteractiveToolsBuilder.MvcApplication.IntializeControllers() in C:\Dev\Team Interactive Tools\trunk\Infrastructure\Manufacturing\InteractiveToolsBuilder\Global.asax.cs:58
   InteractiveToolsBuilder.MvcApplication.Application_Start() in C:\Dev\Team Interactive Tools\trunk\Infrastructure\Manufacturing\InteractiveToolsBuilder\Global.asax.cs:64

我在 web.config 中添加了以下信任级别,即使 Web 服务器似乎以“完全”信任级别运行。

谁能告诉我如何克服这个问题?

【问题讨论】:

    标签: asp.net-mvc castle-windsor mvccontrib


    【解决方案1】:

    错误消息具有误导性。问题是由于从 Web 下载程序集后“被阻止”的事实。

    右键单击每个程序集,然后单击“取消阻止”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-02-18
      • 1970-01-01
      • 1970-01-01
      • 2012-08-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多