I'm not a .NET security expert, but this is probably due to the way
ReflectionObjectFactory works (by reflecting the current assembly).

I do not know if the other parts of DbLinq would works in partial trust
(since it often use some kind of reflection), but IMHO
ReflectionObjectFactory sucks...

You might attempt to fix reimplement IObjectFactory with one that know the
DbLinq assembly "by name" not requiring reflection, and try it again...



Let us know!


Giacomo



On Thu, Jun 4, 2009 at 2:54 AM, <[email protected]> wrote:

>
> Has anyone got DBLinq to work in Medium Trust mode???
>
> I have recompiled the DLL's with [assembly:
> AllowPartiallyTrustedCallers()] in the AssemblyInfo files for
> DBLinq.dll and DBLinq.MySQL.dll... This gets me past the
> SecurityException, but the following exception is now thrown:
>
> Type 'DbLinq.Data.Linq.Sugar.IDataMapper' has no implementation
>
> ArgumentException: Type 'DbLinq.Data.Linq.Sugar.IDataMapper' has no
> implementation]
>   DbLinq.Factory.Implementation.ReflectionObjectFactory.Create(Type
> t) +202
>   DbLinq.Factory.Implementation.ReflectionObjectFactory.Get(Type t)
> +115
>   DbLinq.Factory.ObjectFactoryExtensions.Get(IObjectFactory self)
> +115
>   DbLinq.Factory.ObjectFactory.Get() +124
>   DbLinq.Data.Linq.DataContext..ctor(IDatabaseContext
> databaseContext, MappingSource mappingSource, IVendor vendor) +145
>   DbLinq.Data.Linq.DataContext..ctor(IDatabaseContext
> databaseContext, IVendor vendor) +54
>   DbLinq.Data.Linq.DataContext..ctor(IDbConnection dbConnection,
> IVendor vendor) +76
>   WhalesMVC.Models.Whales..ctor(IDbConnection connection) +73
>   WhalesMVC.Helpers.DBHelper.GetDBConnection() +138
>
>
> Any ideas???
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" 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/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to