Look in the directory configuration templates of the NHibernate binary files that you downloaded. It will tell you the correct MySQL dialect configuration. Also if you are using the 3.x NHibernate the proxy configuration is not required.
Basically the codeproject configuration is for for a version 2.x NHibernate rather than the current version. John Davidson On Mon, Dec 26, 2011 at 1:18 PM, Marcin S. Narowski <[email protected]>wrote: > Hi, i'm trying to make first my app in asp.net mvc with nhibernate so > i used example > from > http://www.codeproject.com/Articles/173203/Using-NHibernate-in-ASP-NET > But when trying to get/set any info from database i get following > errors/exceptions: > from app: Could not find the dialect in the configuration > from debugger: System.InvalidOperationException in NHibernate.dll > > tried to get some more info, but no inner exceptions exists. > > My hibernate.cfg.xml file looks like: > <?xml version="1.0" encoding="utf-8" ?> > <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > > <session-factory name="NHibernate"> > <property > name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</ > property> > <property name="connection.connection_string"> > Database=market;Data Source=localhost;User > Id=root;Password=; > </property> > <property > name="dialect">NHibernate.Dialect.MySQL5Dialect</property> > <property > > name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, > NHibernate.ByteCode.Castle</property> > </session-factory> > > </hibernate-configuration> > > i tried also to add with Configuration.AddProperties() but no luck... > Any clue what couses this situation? > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" 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/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en.
