Inheritance security rules violated while overriding member

Nov 18, 2010 at 1:15 AM

After building Orchard from source (rev 3373), executing bin\Orchard results in Error: Inheritance security rules violated while overriding member: 'Orchard.Host.CommandHost.InitializeLifetimeService()'.   This method is overriding MarshalByRefObject.InitializeLifetimeService().  I understand that this error is typically caused by .Net 4.0's new security transparency model.  I also understand that I can eliminate this error by:

A) Marking the InitializeLifetimeServices method with a security attribute to match the MarshalByRefObj's method (SecurityCritical?), or

B) Add the [assembly: SecurityRules(SecurityRuleSet.Level1)] attribute which locks the assembly back to the v2.0 transparency model.

However, I would prefer to not hack the command API, and I know you guys are working on security issues to allow medium trust.  Is there a known solution or work around to this problem.

Nov 18, 2010 at 2:41 AM

Please use the default branch and run in full trust unless you expressly want to try medium trust.

Nov 18, 2010 at 4:29 AM

This has been fixed today: orchard.exe will always run in Full Trust now.

Nov 18, 2010 at 11:20 AM

Perfect.  Thx.