I am using NHibernate version 2.
I was getting error 'Could not find the dialect in the configuration' in the line ISessionFactory factory = cfg.BuildSessionFactory(); of my code.
I simply replace the code related to NHibernate in web.config with the following:
Now its working :)
But I don't know if I am missing any feature or not.