Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: Index out of range

  1. #1
    ahsrescue is offline Member
    Join Date
    Feb 2008
    Posts
    35

    Default Index out of range

    I've got a brand new install of aspdotnetstorefront version 9. When try to go to appconfigs, I get the following error:

    Server Error in '/' Application.

    Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index

    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.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index

    Source Error:


    Line 229: else
    Line 230: {
    Line 231: var defaultStore = Stores[0]; // probably not multi-store
    Line 232: var storeConfigs = AppConfigManager.GetAppConfigCollection(defaultSto re.StoreID);
    Line 233: allConfigs.AddRange(storeConfigs);

    Source File: d:\Domains\dev.ahsrescue.com\wwwroot\Admin\Control s\appconfiglist.ascx.cs Line: 231

    Stack Trace:


    [ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index]
    System.ThrowHelper.ThrowArgumentOutOfRangeExceptio n(ExceptionArgument argument, ExceptionResource resource) +64
    System.ThrowHelper.ThrowArgumentOutOfRangeExceptio n() +15
    System.Collections.Generic.List`1.get_Item(Int32 index) +7497276
    AspDotNetStorefrontAdmin.Controls.AppConfigList.Ge tDatasource() in d:\Domains\dev.ahsrescue.com\wwwroot\Admin\Control s\appconfiglist.ascx.cs:231
    AspDotNetStorefrontAdmin.Controls.AppConfigList.Bi ndData() in d:\Domains\dev.ahsrescue.com\wwwroot\Admin\Control s\appconfiglist.ascx.cs:190
    AspDotNetStorefrontAdmin.Controls.AppConfigList.ct rlSearch_ContentCreated(Object sender, FilterEventArgs e) in d:\Domains\dev.ahsrescue.com\wwwroot\Admin\Control s\appconfiglist.ascx.cs:391
    AspDotNetStorefrontControls.SearcheableTemplate.On ContentCreated(FilterEventArgs e) in C:\Source Control\DP_Products\WebReleases\AspDotNetStorefron tML\Ashland\ASPDNSFControls\SearcheableTemplate.cs :371
    AspDotNetStorefrontControls.SearcheableTemplate.Cr eateChildControls() in C:\Source Control\DP_Products\WebReleases\AspDotNetStorefron tML\Ashland\ASPDNSFControls\SearcheableTemplate.cs :458
    System.Web.UI.Control.EnsureChildControls() +87
    System.Web.UI.Control.PreRenderRecursiveInternal() +44
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Open your sql server management console and run this script against your DB. Make sure to have a full backup first, just in case.

    Let us know if that resolves the error.

    ML v9.x Missing Store Fix.zip

  3. #3
    ahsrescue is offline Member
    Join Date
    Feb 2008
    Posts
    35

    Default Thank you!

    Thank you very much! That worked perfectly. Thank you! Do you know what was the cause of this issue? Was there something wrong with the original upgrade script?

  4. #4
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    Most likely something failed during the initial DB creation/upgrade. Hard to tell without seeing any errors that were thrown when it was first run.