Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6158569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:58:43+00:00 2026-05-23T20:58:43+00:00

I am using Visual Studio 2010 with NHibernate 3.2.0.GA, I do have a web

  • 0

I am using Visual Studio 2010 with NHibernate 3.2.0.GA, I do have a web application with the following Web.Config File:

<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
  <configSections>
    <section name="hibernate-configuration"
             type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"/>
  </configSections>
  <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
    <session-factory name ="Nhibernate.Test">
      <property name="connection.driver_class">
                NHibernate.Driver.SqlClientDriver</property>
      <property name="connection.connection_string">
        Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Mahshid\Desktop\BugTracker\BugTracker\App_Data\BugTrackerDB.mdf;
        Integrated Security=True;User Instance=True
      </property>
      <property name ="adonet.batch_size">10</property>
      <property name="show_sql">true</property>
      <property name="dialect">Nhibernate.Dialect.MsSql2008Dialect</property>
      <property name="command_timeout">60</property>
      <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
      <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory,
                                                  NHiberante.ByteCode.LinFu</property>
    </session-factory>
  </hibernate-configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
</configuration>

I added my sql database as a local one inside vs2010, I also do have two nhibernate hbm.xml files with as follows:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   namespace="BugTracker.Model"
                    assembly ="BugTracker">
  <class name="Bug" table ="Bugs" lazy="false">

    <id name ="BugId" column ="BugId" type="int"
         unsaved-value="0">
      <generator class="native"/>
    </id>

    <property name="Desc" column="Description"/>

    <property name="Fixed" column ="Fixed"/>

    <many-to-one  name="Application"
                  class="Application"
                  column="ApplicationId"
                  cascade="all"
                  not-null="true"/>
  </class>
</hibernate-mapping>

And:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="BugTracker.Model"
                   assembly="BugTracker">
  <class name="Application" table="Applications" lazy="false">
    <id name="ApplicationId" column ="ApplicationId" type="int" unsaved-value ="0">
      <generator class ="native"></generator>
    </id>

    <property name ="Name" column="Name"/>

    <component access ="field.camelcase-underscore" name ="Developer"
               class="Developer">
      <property access ="field.camelcase-underscore" 
                column ="DeveloperFirstName" name="FirstName"/>
      <property access ="field.camelcase-underscore" 
                column="DeveloperLastName" name="LastName"/>
    </component>

    <bag cascade="all-delete-orphan"
          inverse ="true"
          name ="Bugs"
          lazy="false"
          access ="field.camelcase-underscore">
      <key column ="ApplicationId"/>
      <one-to-many class ="Bug"/>
    </bag>

  </class>
</hibernate-mapping>

I set them as embedded resource, believe me but I get the exception in the following code part:

private static void Init()
{
    NHibernate.Cfg.Configuration config;

    config = new NHibernate.Cfg.Configuration();
    config.AddAssembly("BugTracker");
    config.Configure();

    _SessionFactory = config.BuildSessionFactory();
}

With this message:

Could not compile the mapping document: BugTracker.Model.Bug.hbm.xml

Inner Exception Message:

Could not instantiate dialect class Nhibernate.Dialect.MsSql2008Dialect

I know that this is beginer’s issue but i am just a newbie! but i appreciate your ideas…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:58:45+00:00Added an answer on May 23, 2026 at 8:58 pm

    Shouldn’t the name of dialect be NHibernate.Dialect.MsSql2008Dialect? I mean H must be capital?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Visual Studio 2010, I developed a WCF service hosted on a web application
I'm currently using Visual Studio 2010 and have created a 'ASP.NET MVC 3 Web
For reference, I'm using Visual Studio 2010. I have a custom build step defined
I'm having the following problem using the Visual Studio 2010 Team System Beta 1:
I am using Visual Studio 2010 with NHibernate 3.1 and using Fluent NHibernate for
I'm using Visual Studio 2010, and I have a solution containing 2 C++ static
I am using visual studio 2010, my application has a multiu layer architect, MainUI,
Using Visual Studio 2010 beta, when I run my application within the IDE for
Using: Visual Studio 2010 Created: Console Application in C# Accessing: a Java created WSDL
I'm using Visual Studio 2010 / VB / dot net 4.0, and I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.