Fabio, I tried what you recommended and I still get the following error. I'm going to try to download the source for the Castle Dynamic Proxy 2.2 and see if I can add the AllowPartiallyTrustedCallers attribute. [P.S. - I double checked and all my solutions assemblies are marked with with the AllowPartiallyTrustedCallers. Will let you know what I figure out.
=============================== Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SecurityException: That assembly does not allow partially trusted callers.] Castle.DynamicProxy.ModuleScope..ctor(Boolean savePhysicalAssembly, INamingScope namingScope, String strongAssemblyName, String strongModulePath, String weakAssemblyName, String weakModulePath) +0 Castle.DynamicProxy.ModuleScope..ctor(Boolean savePhysicalAssembly, String strongAssemblyName, String strongModulePath, String weakAssemblyName, String weakModulePath) +75 Castle.DynamicProxy.ModuleScope..ctor(Boolean savePhysicalAssembly) +62 Castle.DynamicProxy.ModuleScope..ctor() +31 Castle.DynamicProxy.DefaultProxyBuilder..ctor() +44 Castle.DynamicProxy.ProxyGenerator..ctor() +44 NHibernate.ByteCode.Castle.ProxyFactory..cctor() +49 ================================ On Jan 21, 2:39 pm, Sam Kimmel <[email protected]> wrote: > So the error above is a known issue with Castle Dynamic Proxy 2.1? > I'll try your suggestions when I get home tonight. > > On Jan 21, 2:03 pm, Fabio Maulo <[email protected]> wrote: > > > > > Now you can : > > 1) download NH2.1.2GA sources > > 2) download the new version of Castle's Dynamic Proxy 2.2 > > 3) Copy Castle.Core and Castle.DynamicProxy2 in the lib folder of NH > > 4) compile NHibernate.ByteCode.Castle > > 5) work as normal ;) > > > 2010/1/21 Sam Kimmel <[email protected]> > > > > I am working on a web project and medium trust is a requirement. I > > > downloaded the NHibernate Proxy Generator contrib (1.0.0 Beta 621) and > > > quickly found out that it was created with NH 2.0.1, which was before > > > the Castle Proxy stuff was split out. > > > > I wanted to work with the latest and greatest so I downloaded the > > > source for the NHPG and updated all of the assembly references to the > > > latest stable releases for NH and Castle, added in the IProxyValidator > > > stuff, and recompiled without errors. > > > > The problem is that now when I run the proxy generator I get the > > > following error (excuse any typos, couldn't copy and paste from cmd > > > prompt): > > > > =============== > > > > The user must provide an ADO.NET connection - NHibernate is not > > > creating it. > > > at > > > NHibernate.Connection.UserSuppliedConnectionProvider.GetConnection() > > > at > > > NHibernate.Tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.Prepare > > > () > > > at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords > > > (Dialect dialect, IConnectionHelper connectionHelper) > > > at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update > > > (ISessionFactory sessionFactory) > > > at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, > > > IMapping mapping, Settings settings, EventListeners listeners) > > > at NHibernate.Cfg.Configuration.BuildSessionFactory() > > > at > > > NHibernate.ProxyGenerators.Castle.CastleProxyGenerator.GenerateProxies > > > (Configuration nhibernateConfiguration, String modulePath) > > > at NHibernate.ProxyGenerators.Castle.CastleProxyGenerator.Generate > > > (CastleProxyGeneratorOptions options) > > > at NHibernate.ProxyGenerators.Castle.CastleProxyGenerator.Generate > > > (Object[] args) > > > at NHibernate.ProxyGenerators.CrossAppDomainCaller.Run() > > > at System.AppDomain.DoCallBack(CrossAppDomainDelegate > > > callBackDelegate) > > > at System.AppDomain.DoCallBack(CrossAppDomainDelegate > > > callBackDelegate) > > > at > > > NHibernate.ProxyGenerators.CrossAppDomainCaller.RunInOtherAppDomain > > > (Action '1 callback, Object[] args) > > > at NHibernate.ProxyGenerators.Castle.CastleProxyGenerator.Generate > > > (ProxyGeneratorOptions options) > > > at NHibernate.ProxyGenerators.Console.Program.Execute(TextWriter > > > error, String[] args)" > > > > =============== > > > > Does anyone know what might be missing here? Does anyone have a copy > > > of the Proxy Generators set up for 2.1.2 already that wouldn't mind > > > sharing? > > > > -- > > > 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]<nhusers%[email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/nhusers?hl=en. > > > -- > > Fabio Maulo- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - -- 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.
