I am trying to run Castle in medium trust env. I have added the APTC tag
and the [assembly: SecurityRules(System.Security.SecurityRuleSet.Level1)]
to Castle.Core and Castle.Windsor which allowed the assemblies to run in
medium trust.
but now i get security exception while initialising the container.
at Castle.Core.Internal.PermissionUtil.IsGranted(IPermission permission) at
Castle.MicroKernel.DefaultKernel..ctor(IDependencyResolver resolver,
IProxyFactory proxyFactory) at Castle.MicroKernel.DefaultKernel..ctor() at
Castle.Windsor.WindsorContainer..ctor() at
xxxxxxx.xxx.Common.Facilities.ContainerFactory..ctor() in
C:\Source\xxx\xxx\xxx.xxx\Facilities\ContainerFactory.cs:line 18 at
here's the conatinerfactory class
public sealed class ContainerFactory
{
private static volatile ContainerFactory _instance;
private static readonly object SyncRoot = new object();
private static IWindsorContainer _container;
private ContainerFactory()
{
// Initialize windsor container.
_container = new WindsorContainer();
// NOTE: register concreate type with windsor
// container.Register(Component.For<FooObjectContext>());
_container.Install(FromAssembly.Named("xxxxxxx.xxx.xxxxxxxxx"));
}
public static IWindsorContainer CreateContainer()
{
if (_instance == null)
{
lock (SyncRoot)
{
if (_instance == null)
_instance = new ContainerFactory();
}
}
return _container;
}
}
What can I do to fix this. Thanks
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/castle-project-users/-/rIWUZECQSUsJ.
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.