473,322 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

NHibernate application configuration...

The documents on their website are completely wrong. Following is the a
real example that works with NHibernate 1.0.2.0:

<?xml version="1.0" encoding="utf-8"?>
<configuration
xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<!-- SecurityException is thrown if NHibernate assembly is not in
GAC. -->
<section name="hibernate-configuration"
type="NHibernate.Cfg.ConfigurationSectionHandler"/>
</configSections>
<!-- NHibernate configuration:
---- xmlns="urn:nhibernate-configuration-2.0" must be present to pass
validation.
-->
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0">
<session-factory>
<!-- Database Settings -->
<property
name="hibernate.connection.provider">NHibernate.Co nnection.DriverConnectionProvider</property>
<property
name="hibernate.connection.driver_class">NHibernat e.Driver.SqlClientDriver</property>
<property
name="hibernate.connection.connection_string">Serv er=(local);Database=myDB;User
ID=myName;Password=myPassword</property>
<property
name="hibernate.dialect">NHibernate.Dialect.MsSql2 000Dialect</property>
<!-- Transaction Settings -->
<property
name="hibernate.connection.isolation">ReadCommitte d</property>
<!-- [optional] specify default schema, for improving performance
-->
<property name="hibernate.default_schema">myDB.dbo</property>
<!-- Display SQL (useless for .NET?) -->
<property name="hibernate.format_sql">true</property>
<property name="hibernate.show_sql">true</property>
</session-factory>
</hibernate-configuration>
......

NHibernate.dll *must* be added into GAC before you can use the section
handler in .config.
Cheers!

Mar 18 '06 #1
0 2823

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Pierre | last post by:
Hi, In my C# project (VisitorManagement) I have a subfolder (BusinessObjects) in which I have put the objects needed for NHibernate and the mapping files. In the top of my web service I do a...
1
by: erin.sebastian | last post by:
Hello All, I am new to hibernate and new to nHibernate. I created a small app and when i try and run it i get the error i posted at the bottom of this message. I am using the helper class that...
5
by: gaddoz | last post by:
Hi all, I'm trying to set up a .NET webservice using in data access layer Nhibernate (nhib 1.2.0 beta). The first trouble I met was that a webservice cannot serialize Interfaces, like IList<>....
0
by: TigrouMeow | last post by:
Hello, I'm trying to make a "clean" webservice, using Nhibernate. I'm facing some issues, but i'm quite the beginner with that kind of system. When there are more than 2 clients connected on my...
0
by: beantaxi | last post by:
Hello all, I'm trying to write a simple program, using VS C# 2005 Express and SQL Server Express with NHib 1.0.2. No matter what I try, I'm unable to connect: cannot open connection at...
4
by: IceMan | last post by:
Hi, I am using the configuration object and passing it a Assembly object to load. The assembly object i pass in is from a dll which is in a different folder then the Nhibernate dll. The...
0
by: Jacques Vandensavel | last post by:
I have a legacy table which is composed out three key fields. It is representing a bank. I'm using NHibernate in my ASP.NET application to glue everything together. I'm already searching for an...
14
by: thj | last post by:
Hi, I was wondering what you guys are using and why? LINQ to SQL or NHibernate? Thanks in advance, Tommy
1
by: moorcroft | last post by:
Hi I'm looking for help with getting the latest NHibernate to work with my .Net 3.5 VS 2008 project that I am migrating from .Net 2.0 on VS 2005. Previously (VS 2005 .Net 2.0) I would use the folling...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.