hi, vince23
Normal nhibernate config file must be like this:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory name="Domain">
<!-- DB2 9 -->
<!--
<property name="connection.connection_string">driver={IBM DB2 ODBC DRIVER};Database=PERMBASE;hostname=localhost;port=50000;protocol=TCPIP;uid=Administrator;pwd=myPassword</property>
<property name="connection.driver_class">NHibernate.Driver.OdbcDriver</property>
<property name="dialect">NHibernate.Dialect.DB2Dialect</property>
-->
<!-- MySQL 5 -->
<!--
<property name="connection.connection_string">Server=localhost;Database=PermissionBase;User Id=PB_DB_USER;Password=1234567890</property>
<property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>
<property name="dialect">NHibernate.Dialect.MySQLDialect</property>
-->
<!-- Oracle 10g -->
<!--
<property name="connection.connection_string">Data Source=CAIKELUN;User Id=PB_DB_USER;Password=1234567890;Integrated Security=no</property>
<property name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property>
<property name="dialect">NHibernate.Dialect.Oracle9Dialect</property>
-->
<!-- SQL Server 2000/2005 -->
<property name="connection.connection_string">Server=localhost;Database=PermissionBase;User Id=PB_DB_USER;Password=1234567890</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="show_sql">true</property>
<property name="use_outer_join">true</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<property name="cache.provider_class">NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache</property>
<property name="cache.use_query_cache">true</property>
<property name="relativeExpiration">120</property>
<mapping assembly="Domain" />
</session-factory>
</hibernate-configuration>
Are you see "<mapping assembly="Domain" />"this node?
I guess the assembly that your give is work wrong or not incluede the entity "User"!
good luck!
my blog :
http://www.cnblogs.com/Roping
and you can refence this article
http://www.cnblogs.com/Roping/archive/2 ... 89805.html