Business manager error while insert

Vote:
 

Hi ,

CustomerAddress shippingAddress = CustomerAddress.CreateInstance();

I getting error upon businessmanger.insert(shippingAddress ).Error like below

{"No default Instance is registered and cannot be automatically determined for type 'Mediachase.BusinessFoundation.Data.DataContext'\r\n\r\nThere is no configuration specified for Mediachase.BusinessFoundation.Data.DataContext\r\n\r\n1.) Container.GetInstance(Mediachase.BusinessFoundation.Data.DataContext)\r\n"}

i am working under the windows application.

Thanks in advance,

#189298
Mar 14, 2018 17:56
Vote:
 

Which windows application would that be?

My guess would be that BusinessFoundation haven't been initialized properly.

#189343
Mar 15, 2018 13:57
Vote:
 

It's worth noting that we no longer support "standalone application", at least, not "officially". To make it work you would have to make sure the initialization chain works, which is not trivial.

Our suggested approach is to build it as an extension API to your website, and run your code from there. In that way you can guarantee that you have all the contexts you need, without having to do anything to set them up.

#189348
Mar 15, 2018 15:59
Vote:
 

Thank you team,

But i need create an organisational address without accessing our epi site thats why i am using the windows application for the address creations.

please help me out.how can i initialize the businessmanager.create() in windows app.

#189360
Mar 16, 2018 8:41
Vote:
 

<p>Thank you team,</p> <p>But i need create an organisational address without accessing our epi site thats why i am using the windows application for the address creations.</p> <p>please help me out.how can i initialize the businessmanager.create() in windows app.</p> <p></p> <p></p> <p></p>

#189361
Mar 16, 2018 8:58
Vote:
 

<p>Thank you team,</p> <p>But i need create an organisational address without accessing our epi site thats why i am using the windows application for the address creations.</p> <p>please help me out.how can i initialize the businessmanager.create() in windows app.</p> <p></p> <p></p> <p></p>

#189362
Mar 16, 2018 9:37
Vote:
 

Hi Erik Norberg,

I am new to epi server.Can u please help me how to initialize the busineessmanger in windows form application.its hurry to proceed.

Thanks in advance

#189374
Mar 16, 2018 14:59
Vote:
 

First off this isn't supported and it is subject to unannounced changes as it is all internal areas we are getting into.

One thing you should always include in your posts here on the forum is what version of CMS and Commerce you are using, especially when we are getting into these darker areas the solutions will not work for all versions.

First thing you need to make sure you are doing is calling the framework initialization:

using EPiServer.Framework.Initialization;
InitializationModule.FrameworkInitialization(HostType.Service);
#189378
Mar 16, 2018 15:52
Vote:
 

Hi Erik,

I am getting error like below

An unhandled exception of type 'EPiServer.Framework.Initialization.InitializationException' occurred in EPiServer.Framework.dll

Additional information: Initialize action failed for Initialize on class EPiServer.Enterprise.Internal.EnterpriseInitialization, EPiServer.Enterprise, Version=10.3.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7

inner exception

{"Failure while building 'Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType+<>c__DisplayClass6_0).p, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType)._serviceLocator)', check the inner exception for details\r\n1.) Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType+<>c__DisplayClass6_0).p, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType)._serviceLocator)\r\n2.) Instance of EPiServer.Web.SystemDefinition (System.Object)\r\n3.) new DependentContentTransfer(*Default of IContentLoader*, *Default of IContentTypeRepository*, *Default of IPermanentLinkMapper*, *Default of SiteDefinitionRepository*, *Default of SystemDefinition*)\r\n4.) EPiServer.Core.Transfer.Internal.DependentContentTransfer\r\n5.) Instance of EPiServer.Core.Transfer.IDependentContentTransfer (EPiServer.Core.Transfer.Internal.DependentContentTransfer)\r\n6.) new PropertyContentReferenceListTransform(*Default of IPermanentLinkMapper*, *Default of IContentLoader*, *Default of IDependentContentTransfer*)\r\n7.) EPiServer.Core.Transfer.Internal.PropertyContentReferenceListTransform\r\n8.) Instance of EPiServer.Core.Transfer.Internal.PropertyContentReferenceListTransform\r\n9.) Container.GetInstance(EPiServer.Core.Transfer.Internal.PropertyContentReferenceListTransform)\r\n"}

"

epi version - 10.3.1

commerce version - 10.2.1

Please give some idea.

#189381
Edited, Mar 16, 2018 16:57
Vote:
 

Only thing i can make out from that exception is that the problem is detected in the StructureMap and it seem to relate to setting up the SystemDefinition.

Have you installed the nuget packages into your application project?

Have you supplied all needed configs matching your web configuration?

#189443
Mar 19, 2018 16:48
* 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.