What is the problem with my ActiveRecord web.config lock

I am trying to upgrade my ASP.NET MVC 1 website to version 2. In doing so, I need to update all my other assemblies. This also includes the Castle ActiveRecord DLL. Here is the error I get:

Configuration Error Description: An error occurred while processing the configuration file necessary to service this request. Please read the specific error details below and modify the configuration file accordingly.

Parser error message: An error occurred while creating a section handler configuration for activerecord: An exception was caused by the target call.

<configSections>
        <section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord" />
...
</configSections>

<activerecord isWeb="true" isDebug="false">
    <config>
        <add
        key="hibernate.connection.driver_class"
        value="NHibernate.Driver.SqlClientDriver" />
        <add
                key="hibernate.dialect"
                value="NHibernate.Dialect.MsSql2005Dialect" />
        <add
                key="hibernate.connection.provider"
                value="NHibernate.Connection.DriverConnectionProvider" />
        <add
                                key="hibernate.connection.connection_string"
                                value="Data Source=(local)\SQLEXPRESS;Initial Catalog=db;Integrated Security=SSPI;" />
    </config>
</activerecord>

I don’t see anything bad here, I added "sleep mode". to the beginning of the key, following:

http://www.castleproject.org/activerecord/documentation/v1rc1/manual/xmlconfigref.html

, , , , , .

+3
3

NHibernate ProxyFactoryFactory ( , ). ActiveRecord proxy factory, :

<add key="proxyfactory.factory_class" value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle"/>

, NHibernate.ByteCode.Castle.dll, Castle.DynamicProxy2.dll, Castle.Core.dll

release_mode, .

hibernate. NHibernate 2.0. Castleproject.org, , Castle ActiveRecord RC1 (very), NHibernate (1.0 - ). XML ActiveRecord .

+2

, .

?

Active Record?

, .

+2

Here is what I have now:

<add
            key="connection.driver_class"
            value="NHibernate.Driver.SqlClientDriver" />
            <add
                    key="dialect"
                    value="NHibernate.Dialect.MsSql2000Dialect" />
            <add
                    key="connection.provider"
                    value="NHibernate.Connection.DriverConnectionProvider" />
            <add
                                key="connection.connection_string"

I updated the latest build of Castle Active Record 2.1.2 and this error went away ... now I have:

The ProxyFactoryFactory was not configured.
Initialize 'proxyfactory.factory_class' property of the session-factory configuration section with one of the available NHibernate.ByteCode providers.
Example:
<property name='proxyfactory.factory_class'>NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
Example:
<property name='proxyfactory.factory_class'>NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>

good dear ...

0
source

Source: https://habr.com/ru/post/1754745/


All Articles