Error with config file in production

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 лет назад
Hey guys,

Added a new shipping computation method to nopCommerce and I'm having problems making it work in production.

The custom shipping method needs some data from the database so I had to make a Manager, a DBProvider, etc..
I've added 2 entries to my web.config files:

under configuration.nopDataProviders:

<CarlTireShippingRateProvider defaultProvider="SQLCarlTireShippingRateProvider">
      <providers>
        <add name="SQLCarlTireShippingRateProvider" type="Tousdan.Shipping.CarlTireCustomShipping.SQLCarlTireShippingRateProvider, Tousdan.Shipping.CarlTireCustomShipping" connectionStringName="NopSqlConnection"/>
      </providers>
    </CarlTireShippingRateProvider>    

and in configsections.sectionGroup:

<section name="CarlTireShippingRateProvider" type="NopSolutions.NopCommerce.DataAccess.DBProviderSection, Nop.DataAccess" requirePermission="false"/>

Everything works if I attempt to use these values in debug but do not work in production. I'm using the same connectionStrings.config file and the same database.

When I attempt to debug the error, nothing goes wrong and when I try in production, blam I get this ASP error:

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: NopSolutions.NopCommerce.DataAccess.NopSqlDataHelper.GetConnectionString(System.String)

Source Error:


Line 480:    <CarlTireShippingRateProvider defaultProvider="SQLCarlTireShippingRateProvider">
Line 481:      <providers>
Line 482:        <add name="SQLCarlTireShippingRateProvider" type="Tousdan.Shipping.CarlTireCustomShipping.SQLCarlTireShippingRateProvider, Tousdan.Shipping.CarlTireCustomShipping" connectionStringName="NopSqlConnection"/>
Line 483:      </providers>
Line 484:    </CarlTireShippingRateProvider>    



Please advise as this error does not help me at all!

Thanks.
13 лет назад
So... noone able to even give me a hint about what the cause of this error might be?
13 лет назад
Well apparently this was due to the fact that I was stubborn and refused to incorporate my classes in nop projects.

Incorporating the classes in the already existing projects did it.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.