Adding Commerce to a Site Created with the Visual Studio Extension

Vote:
 

I've been struggling with this for the last couple of hours, is there a detailed guide out there for adding commerce to a CMS project created in visual studio?

So far I've tried:

  • Deployment Center doesn't recognize the site if I add it to IIS, the site starts up fine and I can log in and access our work.
  • Tried installing via the nuget (just an attempt) it says that it can't find the catalog.
  • I've tried manually merging configuration from a working deployment center site into our project... and proved that I am not super human.

Any thoughts would be greatly appreciated.

James

#89018
Aug 05, 2014 23:11
Vote:
 

Following the directions on a clean site:

http://world.episerver.com/Documentation/Items/Installation-Instructions/Installing-EPiServer-updates/Installing-Commerce/

Results in:

Server Error in '/' Application.The catalog configuration could not be found.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Exception: The catalog configuration could not be found.

Source Error: 

[No relevant source lines]


Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\78e2cf3d\408efcc0\App_global.asax.0.cs    Line: 0 

Stack Trace: 

[Exception: The catalog configuration could not be found.]
   Mediachase.Commerce.Catalog.CatalogContext.EnsureCatalogConfigurationExists() +110
   Mediachase.Commerce.Catalog.CatalogContext..cctor() +215

[TypeInitializationException: The type initializer for 'Mediachase.Commerce.Catalog.CatalogContext' threw an exception.]
   Mediachase.Commerce.Catalog.CatalogContext.get_Current() +0
   Mediachase.Commerce.Initialization.<>c__DisplayClass9.b__2() +28
   StructureMap.Pipeline.<>c__DisplayClass8.<.ctor>b__6(IContext s) +44
   StructureMap.Pipeline.LambdaInstance`1.build(Type pluginType, BuildSession session) +75

[StructureMapException: StructureMap Exception Code:  207
Internal exception while creating Instance 'e6c898ae-53c2-42de-846b-b8d8cabf28d9' of PluginType Mediachase.Commerce.Catalog.ICatalogSystem, Mediachase.Commerce, Version=7.10.1.169, Culture=neutral, PublicKeyToken=6e58b501b34abce3.  Check the inner exception for more details.]
   StructureMap.Pipeline.LambdaInstance`1.build(Type pluginType, BuildSession session) +227
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) +90
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) +75
   StructureMap.Pipeline.ObjectBuilder.ConstructNew(Type pluginType, Instance instance, BuildSession session) +55
   StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session) +164
   StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance) +129
   StructureMap.<>c__DisplayClass3.<.ctor>b__1() +71
   StructureMap.BuildSession.CreateInstance(Type pluginType) +64
   StructureMap.Pipeline.DefaultInstance.build(Type pluginType, BuildSession session) +137
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) +90
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) +75
   StructureMap.Pipeline.ConstructorInstance.Get(String propertyName, Type pluginType, BuildSession session) +69
   StructureMap.Pipeline.ConstructorInstance.Get(String propertyName, BuildSession session) +136
   StructureMap.Pipeline.Arguments.Get(String propertyName) +116
   lambda_method(Closure , IArguments ) +76
   StructureMap.Construction.<>c__DisplayClass2.b__0(IArguments args) +55
   StructureMap.Construction.InstanceBuilder.BuildInstance(IArguments args) +47
   StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder) +387
   StructureMap.Pipeline.ConstructorInstance.build(Type pluginType, BuildSession session) +93
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) +90
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) +75
   StructureMap.Pipeline.ObjectBuilder.ConstructNew(Type pluginType, Instance instance, BuildSession session) +55
   StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session) +164
   StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance) +129
   StructureMap.<>c__DisplayClass3.<.ctor>b__1() +71
   StructureMap.BuildSession.CreateInstance(Type pluginType) +64
   StructureMap.Container.GetInstance(Type pluginType) +85
   EPiServer.ServiceLocation.StructureMapServiceLocator.DoGetInstance(Type serviceType, String key) +68
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +70

[ActivationException: Activation error occurred while trying to get instance of type PriceServiceDatabase, key ""]
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +150
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance() +116
   Mediachase.Commerce.Initialization.CommerceInitialization.Initialize(InitializationEngine context) +125
   EPiServer.Framework.Initialization.<>c__DisplayClass5.b__4() +56
   EPiServer.Framework.Initialization.ModuleNode.Execute(Action a, String key) +73
   EPiServer.Framework.Initialization.ModuleNode.Initialize(InitializationEngine context) +141
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +445
   EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +256
   EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +342
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +78
   EPiServer.Global..ctor() +83
   EPiServerSite3.EPiServerApplication..ctor() +42
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\78e2cf3d\408efcc0\App_global.asax.0.cs:0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +113
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1138
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +124
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +18
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +260
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9885060
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009

#89019
Edited, Aug 05, 2014 23:34
Vote:
 

Hi James,

Installing it via Nuget will not install Commerce Manager, the ECF or the database. So you will need to go via the deployment center. The problem you are facing is probably that you are using a different version of CMS than what the deployment center supports (7.5).

I would install a new CMS + Commerce site via deployment center, upgrade it via nuget to the latest version for BOTH the CMS site (use EPiServer.Commerce Nuget package for this one) and Commerce Manager (Commerce.Manager Nuget package), then start transfer over my code from the old stand alone project.

Adding in Commerce into an existing site is hard as you need to modify a lot of configs and copy the right files to the right location to make it work.

/T

#89020
Aug 06, 2014 0:03
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.