My stacktrace is as follows.

"   at System.Security.CodeAccessSecurityEngine.Check(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet)\r\n   at
System.Security.PermissionSet.Demand()\r\n   at
System.Data.Common.DbConnectionOptions.DemandPermission()\r\n   at
System.Data.SqlClient.SqlConnection.PermissionDemand()\r\n   at
System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection
outerConnection)\r\n   at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)\r\n   at
System.Data.SqlClient.SqlConnection.Open()\r\n   at
NHibernate.Connection.DriverConnectionProvider.GetConnection()\r\n
at
NHibernate.Tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.Prepare()
\r\n   at
NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords(Dialect
dialect, IConnectionHelper connectionHelper)\r\n   at
NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update(ISessionFactory
sessionFactory)\r\n   at
NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping
mapping, Settings settings, EventListeners listeners)\r\n   at
NHibernate.Cfg.Configuration.BuildSessionFactory()\r\n   at
Castle.ActiveRecord.Framework.SessionFactoryHolder.GetSessionFactory(Type
type)\r\n   at
Castle.ActiveRecord.Framework.SessionFactoryHolder.CreateSession(Type
type)\r\n   at Castle.ActiveRecord.ActiveRecordBase.FindAll(Type
targetType, DetachedCriteria detachedCriteria, Order[] orders)\r\n
at Castle.ActiveRecord.ActiveRecordBase.FindAll(Type targetType)\r\n
at Castle.ActiveRecord.ActiveRecordBase`1.FindAll()\r\n   at
TxLocates.TxLocate..ctor()\r\n   at TxLocates.Program.Main()\r\n   at
System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r
\n   at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)\r\n   at System.Runtime.Hosting.ManifestRunner.Run(Boolean
checkAptModel)\r\n   at
System.Runtime.Hosting.ManifestRunner.NewThreadRunner()\r\n   at
System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n
at System.Threading.ExecutionContext.runTryCode(Object userData)\r\n
at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode
code, CleanupCode backoutCode, Object userData)\r\n   at
System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state)\r\n   at
System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)\r\n   at
System.Threading.ThreadHelper.ThreadStart()"

This exception still persits with Lazy = false on all my entities.

On Nov 12, 4:11 am, Roelof Blom <[email protected]> wrote:
> Hi Mike,
>
> From your error it seems you are using ActiveRecord w/ LazyLoad. If so, if
> you disable that is the error going away?
>
> Also, please send a full stacktrace and as much information as you can as
> the crystal balls are shut down here for the weekend.
>
> -- Roelof.
>
> On Thu, Nov 11, 2010 at 9:32 PM, Mike Cameron
> <[email protected]>wrote:
>
>
>
>
>
>
>
> > Before anyone asks, yes, this is a crosspost from SO which can be
> > found at
> >http://stackoverflow.com/questions/4148394/compiling-castle-activerec...
> > .
>
> > Here is my problem. I have a C# Windows Forms application created
> > using the latest stable version of Castle.ActiveRecord (2.1.0 and
> > NHibernate. This application needs to be run from a shared file server
> > running under medium trust. As I'm sure you're aware Castle doesn't
> > play nice under medium trust. Below are the steps I followed.
>
> > - Downloaded NHibernate 2.1.2GA and built with `nant D:assembly.allow-
> > partially-trusted-callers=true`
> > - Downloaded Castle.Core 1.2.0 (https://github.com/castleproject/
> > Castle.Core/tree/1.2.0) and built with `nant -D:assembly.allow-
> > partially-trusted-callers=true -D:common.testrunner.enabled=false`
> > - Moved newly built Castle.Core.dll to Castle.ActiveRecord\lib\net35
> > - Built Castle.ActiveRecord with `nant -D:assembly.allow-partially-
> > trusted-callers=true -D:common.testrunner.enabled=false`
>
> > All compiles and publishes fine however I get this lovely
> > SecurityException "Request for the permission of type
> > 'System.Data.SqlClient.SqlClientPermission, System.Data,
> > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
> > failed.". I'm using Sql Server 2000.
>
> > What am I doing wrong?
>
> > --
> > 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]<castle-project-users%2Bun 
> > [email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/castle-project-users?hl=en.

-- 
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