1

也许这只是 MonoDevelop 中的一个错误,但我正在尝试在 Windows7 上使用 MonoDevelop 构建一个 Orchard 网站。我正在使用最新的 MonoDevelp v 2.6b1,当我尝试运行可以直接从 Codeplex 下载的 Orchard v 1.0 时,出现以下错误。似乎是部分信任错误,但在使用 Visual Studio 2010 时我没有收到此错误。(我试图了解仅使用开源/免费工具创建 Orchard 网站是多么容易)。

添加应用程序'/:.'...

注册申请:

Host:          any

Port:          any

Virtual path:  /

Physical path: C:\dev\Orchard.Source.1.0.20\src\Orchard.Web\

处理异常类型 SecurityException

消息是该程序集不允许部分受信任的调用者。

IsTerminating 设置为 True

System.Security.SecurityException: That assembly does not allow partially trusted callers.
   at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed)
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
   at System.Activator.CreateInstan
Unhandled Exception: System.Security.SecurityException: That assembly does not allow partially trusted callers.
   at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed)
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(String assemblyName, String typeName)
   at System.AppDomain.CreateInstance(String assemblyName, String typeName)
   at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)
   at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)
   at Mono.WebServer.XSP.Server.RealMain(String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet)
   at Mono.WebServer.XSP.Server.Main(String[] args)
   at Application.Xsp.Main(String[] args)
4

1 回答 1

0

我不认为你是在 Mono 上运行的,因为 Mono 没有实现这个安全系统。如果您打算这样做,请确保您告诉 MD 您想在 Mono 上运行。

至于在 Mono 上实际运行它,你可能想看看这个线程: http: //orchard.codeplex.com/discussions/247340

于 2011-03-07T03:28:29.067 回答