Unity IoC error with Composite C1 site

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 yıl önce
I followed the instructions to add nopCommerce on the Composite C1 web site. Everything seemed to go well except when I added a SQL connection string to ConnectionStrings.config.

I receive the following exception when navigating to/refreshing a page on my C1 site:

[NullReferenceException: Object reference not set to an instance of an object.]
   NopSolutions.NopCommerce.BusinessLogic.Infrastructure.IoC.Resolve() +154
   NopSolutions.NopCommerce.BusinessLogic.NopContext.get_WorkingLanguage() +705
   NopSolutions.NopCommerce.BusinessLogic.Profile.MembershipHttpModule.Application_AuthenticateRequest(Object sender, EventArgs e) +3516
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266

I tested the connection string using a UDL file and connectivity to SQL Express or SQL Enterprise (remote server) tests fine. Here are the connection strings I tried:

<connectionStrings>

<add name="NopSqlConnection" connectionString="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=administrator;Initial Catalog=NopCommerce;Data Source=ZOE\SQLEXPRESS" />

</connectionStrings>

and...

<connectionStrings>

<add name="NopSqlConnection" connectionString="Data Source=ZOE\SQLEXPRESS;Initial Catalog=nopCommerce;Integrated Security=SSPI;Persist Security Info=False;User ID=administrator;Password=<password>;Connect Timeout=120" />

</connectionStrings>

I receive the same exception with either string. Since you know the code, perhaps you can tell me what may be the cause of this Unity DI error in the BusinessLogic area.

Also, is there a best practice way to install nopCommerce? Would installation through WebMatrix be simpler than editing/merging web.config from C1 and nopCommerce?

Russ
12 yıl önce
I was able to install a stand-alone version of nopCommerce without any difficulty, and using SQL Express on a VM. The generated connection string was exactly what I was already using with C1 + nopCommerce, so I suspect that C1 2.0 and nopCommerce 1.9 do not get integrated together the way the C1 web site suggested for previous versions of C1 and nopCommerce. The problem may well be how the 2 web.config's were merged.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.