can you verify that the assembly has the APTCA with reflector?

Donn Felker wrote:
> I've downloaded the latest from the trunk this morning and built the
> source with the following command:
>
> Code:
> c:\...@svnrepositories\castle>SharedLibs\build\NAnt\bin\nant quick
> release clean build -t:net-3.5 -D:assembly.allow-partially-trusted-
> callers=true
>
>
> This ended with this:
> Code:
> ...            BUILD SUCCEEDED
>
>             Total time: 12 seconds.
>
>
> BUILD SUCCEEDED - 2 non-fatal error(s), 0 warning(s)
>
> Total time: 55.4 seconds.
>
>
> When I run my site I get this:
> Code:
>
> Server Error in '/' Application.
> 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: Request for the
> permission of type 'System.Security.Permissions.SecurityPermission,
> mscorlib, Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089' failed.
>
> 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: Request for the permission of type
> 'System.Security.Permissions.SecurityPermission, mscorlib,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
> failed.]
>    System.Reflection.StrongNameKeyPair..ctor(Byte[] keyPairArray) +28
>    Castle.DynamicProxy.ModuleScope.GetAssemblyName(Boolean
> signStrongName) +222
>    Castle.DynamicProxy.ModuleScope.CreateModule(Boolean
> signStrongName) +71
>    Castle.DynamicProxy.ModuleScope.ObtainDynamicModuleWithStrongName()
> +126
>    Castle.DynamicProxy.ModuleScope.ObtainDynamicModule(Boolean
> isStrongNamed) +68
>  
> Castle.DynamicProxy.Generators.Emitters.ClassEmitter.CreateTypeBuilder
> (ModuleScope modulescope, String name, Type baseType, IEnumerable`1
> interfaces, TypeAttributes flags, Boolean forceUnsigned) +103
>    Castle.DynamicProxy.Generators.Emitters.ClassEmitter..ctor
> (ModuleScope modulescope, String name, Type baseType, IEnumerable`1
> interfaces, TypeAttributes flags, Boolean forceUnsigned) +98
>    Castle.DynamicProxy.Generators.Emitters.ClassEmitter..ctor
> (ModuleScope modulescope, String name, Type baseType, IEnumerable`1
> interfaces) +53
>    Castle.DynamicProxy.Generators.BaseProxyGenerator.BuildClassEmitter
> (String typeName, Type parentType, IEnumerable`1 interfaces) +112
>  
> Castle.DynamicProxy.Generators.InterfaceProxyWithTargetGenerator.GenerateType
> (String typeName, Type proxyTargetType, Type[] interfaces) +331
>  
> Castle.DynamicProxy.Generators.InterfaceProxyWithTargetGenerator.GenerateCode
> (Type proxyTargetType, Type[] interfaces, ProxyGenerationOptions
> options) +545
>  
> Castle.DynamicProxy.DefaultProxyBuilder.CreateInterfaceProxyTypeWithoutTarget
> (Type interfaceToProxy, Type[] additionalInterfacesToProxy,
> ProxyGenerationOptions options) +144
>  
> Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyTypeWithoutTarget
> (Type interfaceToProxy, Type[] additionalInterfacesToProxy,
> ProxyGenerationOptions options) +61
>    Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget
> (Type interfaceToProxy, Type[] additionalInterfacesToProxy,
> ProxyGenerationOptions options, IInterceptor[] interceptors) +329
>    Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget
> (Type interfaceToProxy, IInterceptor interceptor) +129
>  
> Castle.Facilities.ActiveRecordIntegration.SessionFactoryDelegate.Create
> (ISessionFactoryHolder sessionFactoryHolder, Type arType) +102
>  
> Castle.Facilities.ActiveRecordIntegration.ActiveRecordFacility.OnRootTypeRegistered
> (Object sender, Type rootType) +510
>    Castle.ActiveRecord.Framework.SessionFactoryHolder.Register(Type
> rootType, Configuration cfg) +106
>    Castle.ActiveRecord.ActiveRecordStarter.SetUpConfiguration
> (IConfigurationSource source, Type type, ISessionFactoryHolder holder)
> +372
>    Castle.ActiveRecord.ActiveRecordStarter.Initialize
> (IConfigurationSource source, Type[] types) +735
>    Castle.ActiveRecord.ActiveRecordStarter.Initialize(Assembly[]
> assemblies, IConfigurationSource source, Type[] additionalTypes) +197
>  
> Castle.Facilities.ActiveRecordIntegration.ActiveRecordFacility.InitializeFramework
> (ArrayList assemblies) +841
>    Castle.Facilities.ActiveRecordIntegration.ActiveRecordFacility.Init
> () +986
>    Castle.MicroKernel.Facilities.AbstractFacility.Init(IKernel kernel,
> IConfiguration facilityConfig) +62
>    Castle.MicroKernel.DefaultKernel.AddFacility(String key, IFacility
> facility) +221
>    Burst.DiligentLabs.WebHost.Application.RegisterFacilities(IKernel
> kernel) +66
>    Burst.DiligentLabs.WebHost.Global.Application_Start(Object sender,
> EventArgs e) +177
>
>
> Version Information: Microsoft .NET Framework Version:2.0.50727.4918;
> ASP.NET Version:2.0.50727.4918
>
>
> My mapping is set up as follows:
>
> Code:
>
> <facilities>
>     <facility
>         id="activerecord"
>  
> threadinfotype="Castle.ActiveRecord.Framework.Scopes.HybridWebThreadScopeInfo,
> Castle.ActiveRecord"
>         isDebug="false"
>         isWeb="true"
>         default-lazy="true"
>         requirePermission="false">
>
>       <!-- Medium Trust settings: 
> http://nhforge.org/wikis/howtonh/run-in-medium-trust.aspx
> -->
>
>       <!-- Configure the namespaces for the models using Active Record
> Intergration -->
>       <assemblies>
>         <item>Burst.DiligentLabs.WebHost</item>
>       </assemblies>
>
>       <config>
>         <add key="connection.driver_class"
> value="NHibernate.Driver.SqlClientDriver" />
>         <add key="dialect"
> value="NHibernate.Dialect.MsSql2005Dialect" />
>         <add key="connection.provider"
> value="NHibernate.Connection.DriverConnectionProvider" />
>
>         <!-- Development -->
>         <add key="connection.connection_string" value="Data Source=.
> \SQLEXPRESS;AttachDbFileName=|DataDirectory|admin.mdf;Integrated
> Security=True;User Instance=True;" />
>
>         <add key="proxyfactory.factory_class"
> value="NHibernate.ByteCode.Castle.ProxyFactoryFactory,
> NHibernate.ByteCode.Castle"/>
>       </config>
>
>     </facility>
>
>
>   </facilities>
>
>
> I've tried compiling without the tests (read the How TO Build file),
> with tests, with specifying build targets, etc. I cannot get this to
> work.
>
> Does anyone see where I have the issue?
>
> I"m testing this by placing <trust level="Medium" /> on my local dev
> machine as my host is medium trust.
>
> Thank you for any advice.
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to