Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Damian Green 452 posts 1433 karma points
    Nov 14, 2013 @ 01:22
    Damian Green
    0

    The ConnectionString property has not been initialized

    I have an instance of ucommerce where i have upgraded umbraco from 4.7.1 to 6.1.6

    Ucommerce is v2.5.1 (and is next for the upgrade once ive finished converting my views)

    I can grab the current catalogue using linq but if i try and use the CurrentContext is keels over e.g.  

    SiteContext.Current.CatalogContext.CurrentCatalogName

    Also in the backend all the categories etc are there but if i click on the Product Catalog item for my store i again get the ConnectionString property has not been initialized error

    Umbraco and Ucommerce seem to work ok so the connection strings must be right so really not sure what could be causing this.

    Any ideas?

    Oh and the url-rewrites are in the rewrite file still - i check that already.

    Cheers

    Damian

  • Morten Skjoldager 440 posts 1499 karma points
    Nov 14, 2013 @ 09:02
    Morten Skjoldager
    0

    Can you please provide a callstack of some kind either from the Yellow screen of death or from the UmbracoLog.

    Cheers.

  • Damian Green 452 posts 1433 karma points
    Nov 14, 2013 @ 10:25
    Damian Green
    0
    [InvalidOperationException: The ConnectionString property has not been initialized.]
       System.Data.SqlClient.SqlConnection.PermissionDemand() +6717608
       System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +6712511
       System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +152
       System.Data.SqlClient.SqlConnection.Open() +229
       UCommerce.Content.ContentService.GetDomains() +231
       UCommerce.Runtime.CatalogContext..ctor(IContentService contentService) +48
    
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
       System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +694
       Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, Object[] arguments, Type[] signature) +547
    
    [ComponentActivatorException: ComponentActivator: could not instantiate UCommerce.Runtime.CatalogContext]
       Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, Object[] arguments, Type[] signature) +1170
       Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context) +82
       Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) +29
       Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context) +23
       Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleManager.Resolve(CreationContext context) +127
       Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired) +129
       Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context, Boolean instanceRequired) +28
       Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveServiceDependency(CreationContext context, ComponentModel model, DependencyModel dependency) +425
       Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency) +715
       Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArgumentsCore(ConstructorCandidate constructor, Object[] arguments, CreationContext context, Type[] signature) +228
       Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context, Type[]& signature) +346
       Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context) +60
       Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) +29
       Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context) +23
       Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleManager.Resolve(CreationContext context) +127
       Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired) +129
       Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context, Boolean instanceRequired) +28
       Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments) +142
       Castle.Windsor.WindsorContainer.Resolve() +59
       ASP._Page_Views_Category_cshtml.Execute() in c:\inetpub\fpplive\wwwroot\Views\Category.cshtml:10
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +181
       StackExchange.Profiling.MVCHelpers.WrappedView.Render(ViewContext viewContext, TextWriter writer) +295
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378
       System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +33
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +265
       System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +854224
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__19() +40
       System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +65
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +51
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +51
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
  • Damian Green 452 posts 1433 karma points
    Nov 14, 2013 @ 10:26
    Damian Green
    0

    The error above occurs when i try and access the context as shown in the first post.

    When i am in the backend i dont get the above - but a message saying enable debug - but i get the same error message.

     

  • Jesper Nielsen 141 posts 498 karma points
    Nov 15, 2013 @ 11:49
    Jesper Nielsen
    0

    Hi Damian,

    uCommerce 2.6 probably does not support the Umbraco 6 connection string location. Not sure about the exact version of uCommerce where the new location is supported.

    Later uCommerce versions support both locations, so I think this issue will disappear, once you upgrade uCommerce?!

    But why it would work half-way is a bit of a mystery.

    Kind regards,

    Jesper

  • Damian Green 452 posts 1433 karma points
    Nov 15, 2013 @ 13:49
    Damian Green
    0

    I do like to find these oddities! lol 

    Ok i'll upgrade UC to the latest version.  Can i just go straight from 2.5 to the latest version?

    Thanks,

    Damian

     

     

  • Jesper Nielsen 141 posts 498 karma points
    Nov 15, 2013 @ 14:05
    Jesper Nielsen
    0

    Hi Damian,

    Yes, it should work. But definitely remember to recompile against the latest dll's after upgrade.

    Kind regards,

    Jesper

  • Damian Green 452 posts 1433 karma points
    Nov 15, 2013 @ 15:44
    Damian Green
    0

    Will do - i know ive got some changes to make as the API changed a little.

    Thanks Jesper.

    Damian

     

  • Damian Green 452 posts 1433 karma points
    Nov 16, 2013 @ 12:37
    Damian Green
    0

    Hi Jesper,

    Ive just attempted to upgrade ucommerce and things have not gone well.

    I downloaded the v4 package and ran the installer in umbraco and it fell over during the install with:

    Could not load file or assembly UCommerce.Umbraco v1.0.0. and said that the module was expected to contain an assembly manifest.

    So now I cant get into UCommerce or install the upgrage.  I did take a copy of everything before i started so i can role back but i need to upgrade it.  ANy ideas what went wrong?  

    I have write access to all the dirs...

    the new UCommerce folder was added to the bin directory.  

    Any other info i can get you to help?

     

     

  • Damian Green 452 posts 1433 karma points
    Nov 16, 2013 @ 19:27
    Damian Green
    100

    Ok panic over.  I ended up rolling back to umbraco 4.7.1 and performing the ucommerce upgrade first and then doing the umbraco upgrade after and it worked ok.

    Just on with upgrading all my scripts now.

    The ucommerce upgrade also got rid of the error as detailed in this post but make sure you upgraade uCommerce before Umbraco.

     

     

  • Morten Skjoldager 440 posts 1499 karma points
    Nov 18, 2013 @ 11:16
    Morten Skjoldager
    0

    I'm glad it all worked out. It was a nice bit of information that the upgrade from version 2 to 3 went well. 

    Regards

    Morten

  • Damian Green 452 posts 1433 karma points
    Nov 18, 2013 @ 18:41
    Damian Green
    0

    It was umbraco 4.7.1 > 6.1.6

    and 

    UCommerce 2.5.1 > 4.0.6

    All running ok at the moment.

    Damian

     

Please Sign in or register to post replies

Write your reply to:

Draft