I am deploying Asp.Net MVC 2 application on Windows Server 2003. I am using NHibernate for data access.
When I deployed this application on Windows server 2003 and browse to it the application thro开发者_高级运维ws an exception saying "hibernate.cfg.xml not found under Windows/System32/inetsrv."
Why NHibernate is searching Windows/System32/inetsrv rather than loading "hibernate.cfg.xml" from the bin folder?
Thanks
I'm guessing that your app is looking for the file in the webapp root.
When nhibernate loads your config file you need to set the path to config file with Server.MapPath(@"~/bin/nhibernate.cfg.xml").
精彩评论