Could not compile the mapping document

我出现此问题是因为app.config的配置有错,我用的是NHibernate2.0,把app.config配置成如下:

 

<? xml version = " 1.0 "  encoding = " utf-8 "   ?>
<!--   1 .0配置
< configuration >
  
< configSections >
    
< section name = " nhibernate "  type = " System.Configuration.NameValueSectionHandler, System,
                    Version = 2.0 . 1.4000 ,Culture = neutral, PublicKeyToken = b77a5c561934e089 "  />
   </ configSections >

  
< nhibernate >
    
< add key = " hibernate.connection.provider "  value = " NHibernate.Connection.DriverConnectionProvider "   />
    
< add key = " hibernate.connection.driver_class "  value = " NHibernate.Driver.SqlClientDriver "   />
    
< add key = " hibernate.connection.connection_string "  value = " Data Source=BOCO-Terry\DATA;Initial Catalog=NHibernate;uid=sa;pwd=sa;Integrated Security=SSPI "   />
    
< add key = " hibernate.connection.isolation "  value = " ReadCommitted " />
    
< add key = " hibernate.dialect "  value = " NHibernate.Dialect.MsSql2000Dialect "   />
  
</ nhibernate >
</ configuration >
-->
< configuration >
  
< NHibernate2.0配置如下 !--  Add  this  element  -->
  
< configSections >
    
< section name = " hibernate-configuration "  type = " NHibernate.Cfg.ConfigurationSectionHandler, NHibernate "   />
  
</ configSections >
  
<!--  Add  this  element  -->
  
< hibernate - configuration xmlns = " urn:nhibernate-configuration-2.2 " >
    
< session - factory >
      
< property name = " dialect " > NHibernate.Dialect.MsSql2000Dialect </ property >
      
< property name = " connection.provider " > NHibernate.Connection.DriverConnectionProvider </ property >
      
< property name = " connection.connection_string " > Server = .;initial catalog = NHibernate;Integrated Security = true </ property >
    
</ session - factory >
  
</ hibernate - configuration >
  
<!--  Leave the system.web section unchanged  -->
  
< system.web >
  
</ system.web >
</ configuration >

 

这样这个问题就解决了.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值