Quantcast
Channel: Customized Commerce 13 and earlier versions
Viewing all 9642 articles
Browse latest View live

Catalog Node Sort Order

$
0
0

Hi!
I Have episerver commerce 9.11. We've had a request to order the products on our category pages. Looking in the CatalogNode table, there is a SortOrder column to hold sort data. In addition, there is a text field in commerce manager called SortOrder to edit this data. My preference would be to use Catalog UI to edit sort orders mostly because Commerce Manager requires an IIS reset in order for this sort change to take effect. Also, it's kind of a pain to edit this field in Commerce Manager.

My question is, do any of you know of a way to edit the SortOrder property for products in Catalog UI? When I click and drag the products in Catalog UI they don't seem to sort.

Thanks,

Paul


Checkout workflow - Ignore payment process

$
0
0

Hi,

I have upgraded from Commerce 8.16.1 to 9.20 and have in that process encountered a problem with a workflow.

I have earlier ignored the payment process using the following code:

var workflowParams = new Dictionary<string, object> { { "IsIgnoreProcessPayment", true } };
var checkoutResults = OrderGroupWorkflowManager.RunWorkflow(cart, OrderGroupWorkflowManager.CartCheckOutWorkflowName, false, workflowParams);

This used to work and skipped the payment process.

After the upgrade this does not longer seem to work. After some debugging I found that the following code worked for me:

var workflowParams = new Dictionary<string, object> { { "PreventProcessPayment", true } };
var checkoutResults = OrderGroupWorkflowManager.RunWorkflow(cart, OrderGroupWorkflowManager.CartCheckOutWorkflowName, false, workflowParams);

Originally I followed this blog post:

http://vu3lo.tumblr.com/post/128295808606/episerver-commerce-cartcheckout-workflow-with

Does anyone know how to do this, and is able to confirm what I did is correct?

Is there a better way of ignoring the payment process in the checkout workflow?

/Mads

Send parameter from ActivityFlow into Activity

$
0
0

Hi,

Is there anyway from a ActivityFlow send parameters into the different activities?

For example, from CartValidateVNextActivityFlow send parameters into the different Activities. Se example below.

        public override ActivityFlowRunner Configure(ActivityFlowRunner activityFlow)
        {
            return
                activityFlow
                    .Do<ValidateLineItemsActivity>(SEND_IN_PARAMETERS??)
                    .Do<GetFulfillmentWarehouseActivity>()
                    .If(ShouldCheckInstoreInventory)
                        .Do<CheckInstoreInventoryActivity>()
                    .Else()
                        .Do<CheckInventoryActivity>()
                    .EndIf()
                    .Do<RemoveDiscountsVNextActivity>()
                    .Do<CalculateDiscountsVNextActivity>()
                    .Do<UpdateTotalsVNextActivity>();
        }
    }

Get Url Of Entry From API

$
0
0

Hi Everyone,

I'm currently able to return an entry from the API however, I don't see anyway to get the full url without getting the parent product/nodes to build the url which wouldn't be efficient.

Here's my code so far.

                if (_token == null || !_token.IsExpired()) _token = GetToken(this.ApiConfig.Username, this.ApiConfig.Password);
                using (var client = new HttpClient() { BaseAddress = new Uri(this.ApiConfig.URL) })
                {
                    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", _token.AccessToken);
                    HttpResponseMessage response = client.GetAsync(String.Format($"/episerverapi/commerce/entries/{entryCode}", entryCode)).Result;
                    if (response.StatusCode == HttpStatusCode.OK)
                    {
                        using (StreamReader reader = new StreamReader(response.Content.ReadAsStreamAsync().Result))
                        {
                            var json = reader.ReadToEnd();
                            ce = JsonConvert.DeserializeObject<Entry>(json);
                        }
                    }
                }

I'm using the models right out of the github api sample located here: https://github.com/episerver/ServiceApi-Client/tree/master/EPiServer.ServiceApi.Client/Models/Catalog.

The, API call to '/episerverapi/commerce/entries/{entryCode}' returns this json.

{  "Code":"32452","ApplicationId":"e14675f9-a54b-40bd-a9a1-ccf63e5dd6dd","Name":"11.5mm Dia x 20mm FL, Grade 1, Achromatic Lens","StartDate":"2016-07-08T04:00:00Z","EndDate":"2026-07-19T19:48:24.85Z","IsActive":true,"MetaClass":"Part Number","Catalog":"EdmundOptics","MetaFields":[  
      {  "Name":"AdditionalDetail","Type":"LongHtmlString","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":""
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"ceCertified","Type":"Boolean","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":""
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"DisplayName","Type":"ShortString","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":"11.5mm Dia x 20mm FL, Grade 1, Achromatic Lens"
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"Epi_IsPublished","Type":"Boolean","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":"True"
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"Epi_StartPublish","Type":"DateTime","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":"7/8/2016 4:00:00 AM"
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"Epi_StopPublish","Type":"DateTime","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":"7/19/2026 7:48:24 PM"
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"groupCode","Type":"LongString","Data":[  
            {  "Language":"de","Value":"OPL  A"
            },
            {  "Language":"en","Value":"OPL  A"
            },
            {  "Language":"en-au","Value":"OPL  A"
            },
            {  "Language":"en-gb","Value":"OPL  A"
            },
            {  "Language":"en-ie","Value":"OPL  A"
            },
            {  "Language":"en-sg","Value":"OPL  A"
            },
            {  "Language":"es-es","Value":"OPL  A"
            },
            {  "Language":"es-mx","Value":"OPL  A"
            },
            {  "Language":"fr","Value":"OPL  A"
            },
            {  "Language":"ja-jp","Value":"OPL  A"
            },
            {  "Language":"ko-kr","Value":"OPL  A"
            },
            {  "Language":"zh-cn","Value":"OPL  A"
            },
            {  "Language":"zh-tw","Value":"OPL  A"
            }
         ]
      },
      {  "Name":"hazmat","Type":"Boolean","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":""
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"InternalNotes","Type":"LongHtmlString","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":""
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"isAccessory","Type":"Boolean","Data":[  
            {  "Language":"de","Value":"True"
            },
            {  "Language":"en","Value":"True"
            },
            {  "Language":"en-au","Value":"True"
            },
            {  "Language":"en-gb","Value":"True"
            },
            {  "Language":"en-ie","Value":"True"
            },
            {  "Language":"en-sg","Value":"True"
            },
            {  "Language":"es-es","Value":"True"
            },
            {  "Language":"es-mx","Value":"True"
            },
            {  "Language":"fr","Value":"True"
            },
            {  "Language":"ja-jp","Value":"True"
            },
            {  "Language":"ko-kr","Value":"True"
            },
            {  "Language":"zh-cn","Value":"True"
            },
            {  "Language":"zh-tw","Value":"True"
            }
         ]
      },
      {  "Name":"itemClassId","Type":"Integer","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":""
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"newItemClassDate","Type":"DateTime","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":""
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"oversized","Type":"Boolean","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":""
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"partNumber","Type":"LongString","Data":[  
            {  "Language":"de","Value":"32-452"
            },
            {  "Language":"en","Value":"32-452"
            },
            {  "Language":"en-au","Value":"32-452"
            },
            {  "Language":"en-gb","Value":"32-452"
            },
            {  "Language":"en-ie","Value":"32-452"
            },
            {  "Language":"en-sg","Value":"32-452"
            },
            {  "Language":"es-es","Value":"32-452"
            },
            {  "Language":"es-mx","Value":"32-452"
            },
            {  "Language":"fr","Value":"32-452"
            },
            {  "Language":"ja-jp","Value":"32-452"
            },
            {  "Language":"ko-kr","Value":"32-452"
            },
            {  "Language":"zh-cn","Value":"32-452"
            },
            {  "Language":"zh-tw","Value":"32-452"
            }
         ]
      },
      {  "Name":"partNumberDescription","Type":"LongString","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":"11.5mm Dia x 20mm FL, Grade 1, Achromatic Lens"
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"productClass","Type":"LongString","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":""
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"ProductSchema","Type":"Integer","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":""
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"rohsStatus","Type":"LongString","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":""
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      },
      {  "Name":"Specifications","Type":"LongString","Data":[  
            {  "Language":"de","Value":""
            },
            {  "Language":"en","Value":""
            },
            {  "Language":"en-au","Value":""
            },
            {  "Language":"en-gb","Value":""
            },
            {  "Language":"en-ie","Value":""
            },
            {  "Language":"en-sg","Value":""
            },
            {  "Language":"es-es","Value":""
            },
            {  "Language":"es-mx","Value":""
            },
            {  "Language":"fr","Value":""
            },
            {  "Language":"ja-jp","Value":""
            },
            {  "Language":"ko-kr","Value":""
            },
            {  "Language":"zh-cn","Value":""
            },
            {  "Language":"zh-tw","Value":""
            }
         ]
      }
   ],"SeoInformation":[  
      {  "Title":"","Uri":"115mm-Dia-x-20mm-FL-Grade-1-Achromatic-Lens-de.aspx","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"de"
      },
      {  "Title":"","Uri":"115mm-Dia-x-20mm-FL-Grade-1-Achromatic-Lens-en-au.aspx","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"en-au"
      },
      {  "Title":"","Uri":"115mm-Dia-x-20mm-FL-Grade-1-Achromatic-Lens-en-gb.aspx","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"en-gb"
      },
      {  "Title":"","Uri":"115mm-Dia-x-20mm-FL-Grade-1-Achromatic-Lens-en-ie.aspx","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"en-ie"
      },
      {  "Title":"","Uri":"115mm-Dia-x-20mm-FL-Grade-1-Achromatic-Lens-en-sg.aspx","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"en-sg"
      },
      {  "Title":"","Uri":"115mm-Dia-x-20mm-FL-Grade-1-Achromatic-Lens-es-es.aspx","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"es-es"
      },
      {  "Title":"","Uri":"115mm-Dia-x-20mm-FL-Grade-1-Achromatic-Lens-es-mx.aspx","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"es-mx"
      },
      {  "Title":"","Uri":"115mm-Dia-x-20mm-FL-Grade-1-Achromatic-Lens-fr.aspx","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"fr"
      },
      {  "Title":"","Uri":"115mm-Dia-x-20mm-FL-Grade-1-Achromatic-Lens-ja-jp.aspx","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"ja-jp"
      },
      {  "Title":"","Uri":"115mm-Dia-x-20mm-FL-Grade-1-Achromatic-Lens-ko-kr.aspx","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"ko-kr"
      },
      {  "Title":"","Uri":"115mm-Dia-x-20mm-FL-Grade-1-Achromatic-Lens-zh-cn.aspx","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"zh-cn"
      },
      {  "Title":"","Uri":"115mm-Dia-x-20mm-FL-Grade-1-Achromatic-Lens-zh-tw.aspx","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"zh-tw"
      },
      {  "Title":"","Uri":"32452","UriSegment":"11.5mm-dia-x-20mm-fl-grade-1-achromatic-lens","Description":"","Keywords":"","LanguageCode":"en"
      }
   ],"Prices":[  
   ],"EntryType":"Variation","ChildCatalogEntries":[  
   ],"InventoryStatus":"Disabled","WarehouseInventories":[  
   ],"Associations":[  
   ],"Assets":[  
   ],"Nodes":[  
      {  "Title":"Achromatic Lenses","Type":"CatalogNode","Href":"/episerverapi/commerce/nodes/310","Properties":[  
            {  "Name":"Code","Value":"310"
            }
         ]
      }
   ],"Variation":{  "MinQuantity":0.000000000,"MaxQuantity":0.000000000,"Weight":0.0,"TaxCategory":""
   }
}



Again, I'm looking to get the full url of the given entry. Any idea how to do this without doing additional calls to the parents to get the permalink of each parent product/node?

Thanks,

Paul

AddStaticAttributePropertyValues object reference exception

$
0
0

Hi,

We are using EPiServer.Commerce v9.14.1 and we have encoutnered an issue with our products search page.

Suddenly, the page was throwing below error:

System.NullReferenceException: Object reference not set to an instance of an object.
   at EPiServer.Commerce.Catalog.Provider.Construction.CatalogPropertyLoader.AddStaticAttributePropertyValues(CatalogEntryRow entryRow, EntryContentBase content)
   at EPiServer.Commerce.Catalog.Provider.Construction.CatalogPropertyLoader.LoadStaticContentProperties(CatalogEntryRow entryRow, CatalogItemSeoRow seoRow, VariationRow variationRow, EntryContentBase content)
   at EPiServer.Commerce.Catalog.Provider.Construction.CatalogPropertyLoader.LoadProperties(CatalogEntryRow entryRow, CatalogItemSeoRow seoRow, VariationRow variationRow, EntryContentBase content, MetaObjectAccessor metaObjectAccessor)
   at EPiServer.Commerce.Catalog.Provider.Construction.EntryBuilder.ConstructEntries(CatalogEntryDto entryDto, IDictionary`2 versionsForUnpublishedContent, IList`1 entryNodeRelations, String language)
   at EPiServer.Commerce.Catalog.Provider.Construction.EntryBuilder.Create(IList`1 contentLinks, String language)
   at EPiServer.Commerce.Catalog.Provider.CatalogContentLoader.ConstructContent(IList`1 contentLinks, Func`3 createContentFunc)
   at EPiServer.Commerce.Catalog.Provider.CatalogContentLoader.LoadSpecificContentInstances(IList`1 contentLinks, String language)
   at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.BatchLoad(IList`1 contentLinks, Func`2 dbLoader)
   at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.LoadContents(IList`1 contentReferences, ILanguageSelector selector)
   at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.LoadContent(ContentReference contentLink, ILanguageSelector languageSelector)
   at EPiServer.Core.ContentProvider.<>c__DisplayClass114_0.<LoadContentFromCacheOrRepository>b__0()
   at EPiServer.Core.OptimisticCache`1.Read(String cacheKey, ReadAndCacheObject`1 readAndCacheObject)
   at EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository(ContentReference contentreference, ILanguageSelector selector)
   at EPiServer.Core.ProviderPipelineImplementation.GetItem(ContentProvider provider, ContentReference contentLink, LoaderOptions loaderOptions)
   at EPiServer.Core.DefaultContentLoader.TryGet[T](ContentReference contentLink, LoaderOptions loaderOptions, T& content)
   at EPiServer.Web.Routing.DefaultUrlResolver.GetVirtualPathInternal(ContentReference contentLink, String language, VirtualPathArguments arguments)
   at EPiServer.Commerce.Routing.RequestCacheUrlResolver.GetVirtualPathInternal(ContentReference contentLink, String language, VirtualPathArguments arguments)
   at EPiServer.Web.Routing.UrlResolver.GetUrl(ContentReference contentLink, String language)
   at EPiServer.Web.Mvc.Html.UrlExtensions.ContentUrl(UrlHelper urlHelper, ContentReference contentLink)
   at ASP._Page_Views_Shared_Products_Details_cshtml.Execute() in ~\Views\Shared\Products\Details.cshtml:line 88
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
   at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Recycling app pool fixed the issue.

Any idea what might have caused this error?

Thanks!

Address in IOrderGroup

$
0
0

Hello,

I've just upgraded Commerce from 9.13.0 to 9.20.0

 

The address property in IOrderGroup has been moved.  Does anyone know where I can get or set the address again?  I think I can via the forms -> shipments but I'm not sure if it is the correct way.

http://world.episerver.com/documentation/Class-library/?documentId=commerce/9/2E5043B7

Thanks

Danie

Can't login with new users on azure

$
0
0

I'm running 9.20.0

I can't login with users created in the cms admin. It's been working before and somwhere along the way, this problem arised. It works on my local dev against my local database, but not against the database on azure. I've also tried to run my local application against the database on azure with the same result.

The user is created and appears in the cms, but when I try to login with the user I get a NullReferenceException with following StackTrace:

[NullReferenceException: Object reference not set to an instance of an object.]
at Mediachase.BusinessFoundation.Data.BaseFieldValidator.GetValue()
at Mediachase.BusinessFoundation.Data.StringFieldValidator.EvaluateIsValid()
at Mediachase.BusinessFoundation.Data.BaseFieldValidator.Validate()
at Mediachase.BusinessFoundation.Data.Meta.MetaObject.Validate()
at Mediachase.BusinessFoundation.Data.Meta.MetaObject.OnSaving()
at Mediachase.BusinessFoundation.Data.Meta.MetaObject.Save(Boolean forceSave)
at Mediachase.BusinessFoundation.Data.Meta.MetaObject.Save()
at Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.Create(BusinessContext context)
at Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.Execute(BusinessContext context)
at Mediachase.BusinessFoundation.Data.Business.BaseRequestHandler.Mediachase.BusinessFoundation.Data.Business.IRequestHandler.Execute(BusinessContext context)
at Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePipeline(Request request, IRequestHandler handler)
at Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePipelineInTransaction(Request request, IRequestHandler handler)
at Mediachase.BusinessFoundation.Data.Business.BusinessManager.Execute(Request request)
at Mediachase.BusinessFoundation.Data.Business.BusinessManager.Create(EntityObject target)
at Mediachase.Commerce.Customers.CustomerContact.SaveChanges()
at Mediachase.Commerce.Security.PrincipalExtensions.GetCustomerContact(IPrincipal principal)
at Mediachase.Commerce.Security.PrincipalExtensions.GetContactId(IPrincipal principal)
at Mediachase.Commerce.Core.Modules.BusinessFoundationInitializeModule.context_AuthorizeRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Update: It seems to always happen when a CustomerContact is created. When I try to create a new Contact inside Commerce Manager I get exception at the same place with the following StackTrace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Mediachase.BusinessFoundation.Data.BaseFieldValidator.GetValue() +273
   Mediachase.BusinessFoundation.Data.StringFieldValidator.EvaluateIsValid() +73
   Mediachase.BusinessFoundation.Data.BaseFieldValidator.Validate() +66
   Mediachase.BusinessFoundation.Data.Meta.MetaObject.Validate() +166
   Mediachase.BusinessFoundation.Data.Meta.MetaObject.OnSaving() +118
   Mediachase.BusinessFoundation.Data.Meta.MetaObject.Save(Boolean forceSave) +76
   Mediachase.BusinessFoundation.Data.Meta.MetaObject.Save() +54
   Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.Create(BusinessContext context) +976
   Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.Execute(BusinessContext context) +720
   Mediachase.BusinessFoundation.Data.Business.BaseRequestHandler.Mediachase.BusinessFoundation.Data.Business.IRequestHandler.Execute(BusinessContext context) +60
   Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePipeline(Request request, IRequestHandler handler) +151
   Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePipelineInTransaction(Request request, IRequestHandler handler) +117
   Mediachase.BusinessFoundation.Data.Business.BusinessManager.Execute(Request request) +768
   Mediachase.BusinessFoundation.Data.Business.BusinessManager.Create(EntityObject target) +106
   Mediachase.Commerce.Manager.Apps.MetaUIEntity.Tabs.EntityEditTab.SaveChanges(IDictionary context) +940
   Mediachase.Commerce.Manager.Core.Controls.EditViewControl.SaveChanges(IDictionary context) +290
   Mediachase.Commerce.Manager.Core.SaveControl.OnSaveChanges(Object sender, EventArgs e) +60
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +11762636
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +149
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6015

Split linitems on quantity to own lineitems

$
0
0

Due to a very complex return policy of our customer we would like to split all lineitems on quantity into own lineitems. The cart can work as of now, but when we convert to a purchaseorder is there anyway to split the lineitems on quantity so that they all live on there own row?

Example.

Cart

RowId_1 Product1, quantity 1

RowId_2 Product 2, quantity 3

Then when converted to a purchaseorder.

RowId_1 Product1, quantity 1

RowId_2 Product 2, quantity 1

RowId_3 Product 2, quantity 1

RowId_3 Product 2, quantity 1

Any ideas?

Cheers


Fast way to delete all purchase orders and Carts

$
0
0

A well defined sql structure (with cascade deleted) could have been helpfull here. I occasionally move my production database to development, mostly to have an updated catalog.

Page size: all --> Select all --> Deleted selected is just not possible with so many rows

Promotion applying

$
0
0

Hello.

I have 2 promotions:

1) Entry level which gives 50% off on specified variant (placed price 13$);

2) Order level which gives 1$ off if cart subtotal greater than 10$;

Before applying promotions my cart total is 18$ (subtotal 13$ + handlingtotal 5$).

When I apply entry level promotion I got updated subtotal 6.5$ and total 11.5$. Then I apply the second promotion and I expect that it will not be applied (because condition >10$), but as I see the second promotion is still applied.

I changed the condition to "running total greater than 10$" and now its working as expected but can someone explain whats wrong with conditions built with subtotal/total? And in which cases what conditions better to use? For example, how to change the second promotion to check cart's total (including handling totals and etc)?

Thanks.

P.S. Episerver Commerce 9.19.1

Get current (not cached) inventory responses

$
0
0

Hello,

I'm using the new IInventoryService, the following code:

var response = _inventoryService.Request(new InventoryRequest()
{
   RequestDateUtc = DateTime.UtcNow,
   Items = new[]
   {
       new InventoryRequestItem
       {
          RequestType = InventoryRequestType.Purchase,
          CatalogEntryCode = myVariant.Code,
          Quantity = quantity,
          WarehouseCode = warehouseCode,
          ItemIndex = 0
        }
   }
});

The inventory rows returned appear to be cached - I've tried disabling entry caching in the ecf.catalog.config but no luck.

Any tips :)?

Thanks,

Dean

Add default values to EntityObject properties

$
0
0

I have created the MetaClass and added a UI for it in CommerceManager, I can add new objects but I need to set default values to some of the string properties.
For instance, I want to set the current user name for the property CreatedBy.

My idea to do this is by using MetaClass triggers, but I can't get them to fire.

I have managed to create and added the trigger to the MetaClass, see the included meta information taken from the column mcmd_MetaClass.XSAttributes for my custom MetaClass:

<?xml version="1.0"?>
<AttributeCollection>
  <Attr>
    <Name>Triggers</Name>
    <Type>Mediachase.BusinessFoundation.Data.Meta.Management.Trigger[], Mediachase.BusinessFoundation.Data</Type>
    <Value>
      <ArrayOfTrigger xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <Trigger>
          <Name>trg_SetDefaultValues</Name>
          <Description />
          <Create>true</Create>
          <Update>true</Update>
          <Delete>true</Delete>
          <ConditionName>TriggerAction</ConditionName>
          <ConditionInParameters />
          <ActionName>TriggerAction</ActionName>
          <ActionInParameters />
        </Trigger>
      </ArrayOfTrigger>
    </Value>
  </Attr>
</AttributeCollection>

My MetaClass contains a public method named TriggerAction but it is never called.

What am I doing wrong?
Is there any example code on how to use MetaClass triggers?

Ability to relate lineitems in a cart and keep relations in a purchase order

$
0
0

Hello all

I have a requirement to be able to link a line item to another line item.  For this example imagine line item A = Washing machine and line Item B is a warranty for said line item A.

I have managed to do this using a custom metafield but when it comes to creating the publish order I need to mirror the relationships within the PO as the out of the box SaveToPurchaseOrder does not look at custom metafields.

Q:  Is there anything out of the box, which I can use within the cart object to link these line items in a parent->child hirarchy and, which will be copied over to the purchase order when its created?

Thanks

Update (my response from prevuous post - how I got it working but dont like it):

Q: How did you like them, did you create a metafield on the line item class?

A: Correct, I had to also add the same metafield to the purchase order. and then go through some tree re-creation algorithm to create the hirarchy.  Imagine the trunk is the cart, the main braches are the immediate lineItems, then the smaller branches off them are the child lineItems.  Looping round the cart this way allows me to re-create the hirarchy in the purchase order. (Edit here: Way to match is to match the Code and the quantity(of the parent), link the child in the PO and then record the child is linked, so as not to link again)

I cannot believe EPiServer has nothing out of the box to faciliate child line items related to a parent?  If it does not its missing things like adding services, warranties and sub -upsell items, which need to relate to the parent item.

Sorry re-read your reply.  Custom metafields (in my experience, do not get carried over to the purchase order upon out of the box creation. It needs to be set manually when you have got the cart and purchase order available at the same time.

Ordering of Categories an Entry "Belongs To"

$
0
0

Hello!

The strategy we're using is as follows: The first category an entry belongs to is the primary category (used for product breadcrumb/search), and the second category an entry belongs to will be is the brand category (used for faceting search and brand logos etc).

We manually created all the categories within EPiServer, and used the EPiServer service API to bring in some entries and assign them to categories. All good so far! When navigating to a category and "moving" a product to another category, we can confirm the intended behaviour works - the products' categories change in the correct order, e.g.

P1 belongs ot C1 and C2. If we navigate to C1 and "move" the P1 to C3, the P1 categories will be C3 and C2. As expected, all good!

However now if we create a new category (after the inital upload) and we navigate to C3, if we drag P1 into C4; the categories are now C2 and C4. This isn't ideal, as the ordering of categories is essential to our initial strategy, we'd expect them to be C4 and C2.

Is this intended behaviour? Could anyone provide some info, we don't want our customer navigating through hundreds of products every change :)


Regards,

Dean

Error backend after upgrade to CM 9.9

$
0
0

HI!

I upgraded front end site from cms.core 9.6.1 to 9.7 and Commerce 9.8.1 to 9.9.

But the back end dll Mediachase.BusinessFoundation.Data and other dlls seems to be asking for Episerver.Framework version 9.6.1, is it not compatible?

[InitializationException: While loading .NET types from "Mediachase.ConsoleManager" the following error(s) was reported (limited to first 10 errors):
     - System.IO.FileLoadException: Could not load file or assembly 'EPiServer.Framework, Version=9.6.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'EPiServer.Framework, Version=9.6.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
=== Pre-bind state information ===
LOG: DisplayName = EPiServer.Framework, Version=9.6.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7
 (Fully-specified)
LOG: Appbase = file:///C:/commerce/Holmen.CommerceManager.Web/
LOG: Initial PrivatePath = C:\commerce\Holmen.CommerceManager.Web\bin
Calling assembly : Mediachase.BusinessFoundation.Data, Version=9.9.0.1430, Culture=neutral, PublicKeyToken=41d2e7a615ba286c.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\commerce\Holmen.CommerceManager.Web\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: EPiServer.Framework, Version=9.6.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/2fa4bb56/b3eb3d34/EPiServer.Framework.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/2fa4bb56/b3eb3d34/EPiServer.Framework/EPiServer.Framework.DLL.
LOG: Attempting download of new URL file:///C:/commerce/Holmen.CommerceManager.Web/bin/EPiServer.Framework.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
===

Still problems with CM being compatible with all CMS dll versions?

I do have assembly bindings set to:

<dependentAssembly><assemblyIdentity name="EPiServer.Framework" publicKeyToken="8fe83dea738b45b7" culture="neutral" /><bindingRedirect oldVersion="0.0.0.0-9.7.0.0" newVersion="9.7.0.0" /></dependentAssembly>

Content not found error on CatalogRouteHelper.MapDefaultHierarchialRouter

$
0
0

Hi,

We have an initialization module which makes the following call to configure the commerce routing:

         CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, false);

But it's blowing up with the following error:

[ContentNotFoundException: Content with id -1073741823__CatalogContent was not found]
   EPiServer.Core.DefaultContentLoader.Get(ContentReference contentLink, LoaderOptions loaderOptions) +622
   EPiServer.Commerce.Routing.CatalogRouteHelper.MapDefaultHierarchialRouter(RouteCollection routes, Func`1 startingPoint, Boolean enableOutgoingSeoUri) +289
   Braun.Web.Business.Initialization.FindCommerceInitializationModule.Initialize(InitializationEngine context) in C:\Dev\Git\braun\src\Braun.Web\Business\Initialization\FindCommerceInitializationModule.cs:55
   EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +56
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +348

This suggests that the content loader isn't yet available, however the init module already has a module dependency:

    [InitializableModule]
    [ModuleDependency(typeof(EPiServer.Web.InitializationModule))]
    public class FindCommerceInitializationModule : IConfigurableModule
    {
	}

Any idea what could be going wrong?

Thanks

After installing service API, if i'm logged into Episerver cannot post to basket

$
0
0

Hey all.  Complicated one here.

Situation:

a) I'm logged into episerver so the basket created within episerver commerce is under the logged in user

b) going to a basket page, the controller code can access the current basket using the name "Default"

c) Issue is, the page uses JQuery posts to add to the basket (simple method in the controller with the attribute of post).  This is not working as the post method, when getting the current basket comes back with nothing.  This is using the same code as the controller code.

d) the same issue also occurs when reading the basket after the page has loaded.  The solution i'm working with does a GET after the page load using Jquery to get the current cart.  If I'm logged in, the cart comes back as blank, but on the controller method for page load say Index() the cart object is accessable.

This looks to me like an authentication issue since Service API was added to the project.

If I log out of Episerver and use an anomy basket, the JQuery posts all work fine.

Any ideas?

Thanks

Sorry, version of episerver = CMS.Core:9.12.0 Commerce.Core:9.19

Login details for Commerce demo site Quanta

$
0
0

Hi

What is the login details for the Commerce Manager site on the Quanta demo site?

http://quanta.episerverdemo.com/EPiServer/Commerce/Manager/Admin/SitePlugin/CommerceManager.aspx

These did not work and now its locked :)

epiuser/episerver

epipartner/epipartner

admin/store

br

Andreas

View / App errors in Commerce Manager Administrative Pages.

$
0
0

EPiServer Commerce Version: 9.14 (build 1)

After recently deploying Commerce Manager to a client's environment, we're seeing strange errors when attempting to access the Commerce Manager Administrative pages.

After logging in to the Commerce Manager admin pages, we immediately see a JavaScript error stating, "Specfied view 'Catalog-List' can not be located in 'Catalog' App" (also see screenshot).

Dismissing the JavaScript error gives a further error (I presume the same thing, but effectively rendered from server side) - See screenshot:

Please note that, apart from some configured database connection strings, the entire set of Commerce Manager installation files are the same as those that I have running locally on my development machine, where the Commerce Manager Admin pages are working correctly.

I've tried tracing the error back from source and have found JavaScript errorr source as being the the "MC_FindView" function within the ManagementClient2.js file (usually located in Apps\Shell\Scripts\Shell) and can see that the error is generated when the internal "this.Views""property" of the ManagementClient function does not contain the required View for the given View & App name, however, I can't see how the "Views" property gets populated with data.

Can anyone helpme to understand what may be causing this error, and where the Apps/Views data is ultimately sourced from?

Rapidly decreasing performance with moderate concurrency levels, StructureMap lock contention

$
0
0

Can anyone comment on this or state whether they have seen or resolved a similar issue. Testing was performed against an EPi commerce site
(http://world.episerver.com/releases/episerver---update-114/) and the mainline of Alloy downloaded from the public Git from 9th August 2016.

During performance testing we noticed a very large increase in response times for page requests to an EPiServer commerce site when under load. Given the scenario of a single user accessing a CMS page as a benchmark (the site has been restarted and the page accessed once to initialise and load the page prior to each test) we saw an approximate increase of the response time upwards of 40x when the same request was made by 100 users concurrently. (100 threads running concurrently each requesting the same page twice sequentially and the average response in milliseconds recorded)

This same effect can be seen to slightly lesser extent against the Alloy site where they home page was used, in this case it was an approximate 30x increase. Alloy was used rather than Quicksilver as it should be a less complex site.

When attaching the profiler (in our case RedGate) the major issues seems to be with Structuremap and I believe potentially resource contention. A single request to the homepage for Alloy generates tens of thousands of calls to the Structuremap Container.GetInstance method. Internally this results in calls to SessionCache.GetInstance and RootInstanceGraph.GetDefault which in turn result in calls to Cache.Fill and LifecycleObjectCache.Get. Both these methods rely on locking. With a single user this doesn't present as an issue. As I increase the number of concurrent requests the time waiting within these locking methods rapidly increases.

It appears in newer versions of Structuremap 4+ the Cache class was first used less and then removed to improve resource contention issues. This may indicate there is/was a general issue in Structuremap that is highlighted with EpiServer because of itsusage patterns.

Has anyone else seen this or similar behaviour, or am I missing something obvious that needs to be configured with Epi or IIS to maximise concurrent performance?. (FYI - The server resources are not being tasked during these tests, CPU generally sits around 10%)

I would assume this can be mitigated by implementing output caching or using many micro instances in a webfarm when hosting.

Thanks,

Andrew

Viewing all 9642 articles
Browse latest View live


Latest Images