Hi, Had a few hours to revisit this but still no joy, hitting my head against a brick wall....
Basically using the defaultProxy under medium trust I get the following error: /Proxy/DyanmicProxy/ProxyFactory.cs line 51 object result = Activator.CreateInstance(proxyType); This throws the following error:- Operation could destabilize the runtime. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Source File: ProxyFactory.cs Line: 51 Stack Trace: [VerificationException: Operation could destabilize the runtime.] CmsContentProxy..ctor() +27 [TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98 System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241 System.Activator.CreateInstance(Type type, Boolean nonPublic) +69 System.Activator.CreateInstance(Type type) +6 NHibernate.Proxy.DynamicProxy.ProxyFactory.CreateProxy(Type instanceType, IInterceptor interceptor, Type[] baseInterfaces) in ProxyFactory.cs:51 NHibernate.Proxy.DefaultProxyFactory.GetProxy(Object id, ISessionImplementor session) in DefaultProxyFactory.cs:20 If anyone is interested I have provided a policy.config file (see attached), all you need to do is to place it in your web root and place this in your web.config <securityPolicy> <trustLevel name="Custom" policyFile="policy.config" /> </securityPolicy> <trust level="Custom" originUrl="" /> I really would love to get this NH3.2 running in Medium trust as I love the new mapping by code syntax, any ideas, pointers, workarounds will be gratefully received. Many Thanks Rippo -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of AJCS Sent: 17 July 2011 04:59 To: nhusers Subject: [nhusers] Re: 3.2 Medium Trust This might help: http://haacked.com/archive/2010/11/04/assembly-location-and-medium-trust.asp x On Jul 16, 1:32 pm, Richard Wilde <[email protected]> wrote: > Has anyone had a stab at getting NHibernate 3.2 running in Medium Trust. I > have had a go but hit a few barriers. I do have a modified medium trust > policy file if anyone wants to help me on this as you can see the NH code > that causes the security messages. > > I have had a look at the release notes and came across this:- > > Build 3.0.0.Alpha3 (rev5226) > ============================= > ** Bug > * [NH-2339] - After rev 5139 (apply NH-2335) NHibernate does not work > under Medium Trust > > Thanks > Rippo -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
policy.config
Description: XML document
