http://www.cnblogs.com/guide/admin/Files.aspx
好心人可以下载
以前下是错误内容
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: NHibernate.MappingException: <session-factory xmlns='urn:nhibernate-configuration-2.2'> element was not found in the configuration file.
源错误:
行 26: Configuration cfg = new Configuration();
行 27: string mapPath =Server.MapPath("Post.hbm.xml");
行 28: cfg.Configure(mapPath);
行 29: cfg.AddAssembly("NHClass");
行 30: ISessionFactory factory = cfg.BuildSessionFactory();
|
[MappingException: <session-factory xmlns='urn:nhibernate-configuration-2.2'> element was not found in the configuration file.] NHibernate.Cfg.Configuration.DoConfigure(XmlDocument doc) +308 NHibernate.Cfg.Configuration.Configure(XmlTextReader reader) +494 NHibernate.Cfg.Configuration.Configure(String fileName) +102 NH.AddPost() in f:\NHibernateTest\App_Code\NH.cs:28 _Default.Page_Load(Object sender, EventArgs e) in f:\NHibernateTest\Default.aspx.cs:15 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436 |
版本信息: Microsoft .NET Framework 版本:2.0.50727.1433; ASP.NET 版本:2.0.50727.1433
漏了
这个element
@湖: 我遇到了这个问题 请问怎么解决?
不行啊。你引用的哪些dll文件?