That looks like a DynamicProxy issue. Are you strongly signing the
My.Project assmebly?

--- Shawn Hinsey <[EMAIL PROTECTED]> wrote:

> The following exception is thrown when I call 
> 
>       DomDaoManagerBuilder builder = new DomDaoManagerBuilder();
>       builder.Configure();
> 
> Unhandled Exception: System.TypeInitializationException: The type
> initializer for 'My.Project.Domain.Keyword' threw an exception. --->
> IBatisNet.Common.Exceptions.ConfigurationException:
> - The error occurred while configure DaoSessionHandler.
> - configure dao
> - Check the My.Project.DataAccess.Implementation.KeywordDao,
> My.Project.
> ---> IBatisNet.Common.Exceptions.ConfigurationException: Error
> configuring DAO. Cause:Unable to obtain public key for
> StrongNameKeyPair. ---> System.ArgumentException: Unable to obtain
> public key for StrongNameKeyPair.
>    at System.Reflection.StrongNameKeyPair.nGetPublicKey(Boolean
> exported, Byte[] array, String container)
>    at System.Reflection.StrongNameKeyPair.get_PublicKey()
>    at System.AppDomain.InternalDefineDynamicAssembly(AssemblyName
> name,
> AssemblyBuilderAccess access, String dir, Evidence evidence,
> PermissionSet requiredPermissions, PermissionSet optionalPermissions,
> PermissionSet refusedPermissions, StackCrawlMark& stackMark)
>    at System.AppDomain.DefineDynamicAssembly(AssemblyName name,
> AssemblyBuilderAccess access)
>    at
>
Castle.DynamicProxy.Builder.CodeGenerators.ModuleScope.CreateModule(Bool
> ean signStrongName)
>    at
>
Castle.DynamicProxy.Builder.CodeGenerators.ModuleScope.ObtainDynamicModu
> le(Boolean signStrongName)
>    at
> Castle.DynamicProxy.Builder.CodeBuilder.EasyType..ctor(ModuleScope
> modulescope, String name, Type baseType, Type[] interfaces, Boolean
> serializable)
>    at
>
Castle.DynamicProxy.Builder.CodeGenerators.BaseCodeGenerator.CreateTypeB
> uilder(String typeName, Type baseType, Type[] interfaces)
>    at
>
Castle.DynamicProxy.Builder.CodeGenerators.InterfaceProxyGenerator.Gener
> ateCode(Type[] interfaces, Type targetType)
>    at
>
Castle.DynamicProxy.Builder.DefaultProxyBuilder.CreateInterfaceProxy(Typ
> e[] interfaces, Type type)
>    at Castle.DynamicProxy.ProxyGenerator.CreateProxy(Type[]
> interfaces,
> IInterceptor interceptor, Object target)
>    at IBatisNet.DataAccess.Configuration.DaoProxy.NewInstance(Dao
> dao)
>    at IBatisNet.DataAccess.Configuration.Dao.Initialize(DaoManager
> daoManager)
>    --- End of inner exception stack trace ---
>    at IBatisNet.DataAccess.Configuration.Dao.Initialize(DaoManager
> daoManager)
>    at
>
IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.ParseDaoFactory(
> ConfigurationScope configurationScope, DaoManager daoManager)
>    at
>
IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.GetContexts(Conf
> igurationScope configurationScope)
>    at
>
IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.BuildDaoManagers
> (XmlDocument document, Boolean useConfigFileWatcher)
> 
> What should I be looking for in my DAO implementation? 
> 
> Thanks,
> Shawn
> 

Reply via email to