关于castle和Could not find the dialect in the configuration错误
最近試了試castle,NND,老是報“Could not find the dialect in the configuration”,明明配的沒問題,上網搜索所有教程都是這么配的。后來在一國外的網站解決NHibernate的問題的帖子,看的一哥們說把hibernate去了試試,當時也沒試(關鍵是那帖子說這個辦法沒解決問題)。囧rz,今天試了試,居然解決問題了。估計可能和castle的版本有關系(順便說一下castle網站的源碼的例子也是不對的,NND)。希望遇到同樣錯誤的哥們能搜到此文章。
原配置:
<configSections>
 <section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord" />
</configSections>
<activerecord>
 <config>
 <add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
 <add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
 <add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
 <add key="hibernate.connection.connection_string" value="UID=sa;Password=sa;Initial Catalog=ARDemo;Data Source=." />
 </config>
</activerecord>
正確配置:
<configSections>
 <section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord" />
</configSections>
<activerecord>
 <config>
 <add key="connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
 <add key="dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
 <add key="connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
 <add key="proxyfactory.factory_class" value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" />
 <add key="connection.connection_string" value="UID=sa;Password=sa;Initial Catalog=ARDemo;Data Source=." />
 </config>
</activerecord> 
轉載于:https://www.cnblogs.com/homezzm/p/3253006.html
總結
以上是生活随笔為你收集整理的关于castle和Could not find the dialect in the configuration错误的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 远程登录:ftp
- 下一篇: C# Socket编程笔记(转)
