I managed to figure out what was going on, but I can't say that I'm sure what caused it.
When I went to see what happened if I strongly signed the assembly, I encountered the error "Failed to generate a strong name key pair -- Access is denied." After some quick googling, I found that I needed to reset the permissions on C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys. -----Original Message----- From: Ron Grabowski [mailto:[EMAIL PROTECTED] Sent: Monday, April 17, 2006 8:29 PM To: [email protected] Subject: Re: StrongNameKeyPair exception from DAO framework 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 >

