Server Error in '/' Application.

Index was outside the bounds of the array.

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.IndexOutOfRangeException: Index was outside the bounds of the array.

Source Error:


Line 62:             //SET FIELDS FROM ROW DATA
Line 63:             storeSetting.StoreSettingId = dr.GetInt32(0);
Line 64:             storeSetting.StoreId = dr.GetInt32(1);
Line 65:             storeSetting.FieldName = dr.GetString(2);
Line 66:             storeSetting.FieldValue = dr.GetString(3);

Source File: C:\inetpub\wwwroot\MultiSite\Projects\CommerceBuilder\Stores\StoreSetting.Generated.cs    Line: 64

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   System.Data.SqlClient.SqlDataReader.CheckDataIsReady(Int32 columnIndex, Boolean allowPartiallyReadColumn, Boolean permitAsync, String methodName) +1775194
   System.Data.SqlClient.SqlDataReader.TryReadColumn(Int32 i, Boolean setTimeout, Boolean allowPartiallyReadColumn) +48
   System.Data.SqlClient.SqlDataReader.GetInt32(Int32 i) +31
   CommerceBuilder.Stores.StoreSetting.LoadDataReader(StoreSetting storeSetting, IDataReader dr) in C:\inetpub\wwwroot\MultiSite\Projects\CommerceBuilder\Stores\StoreSetting.Generated.cs:64
   CommerceBuilder.Stores.StoreSettingDataSource.LoadForStore(Int32 maximumRows, Int32 startRowIndex, String sortExpression) in C:\inetpub\wwwroot\MultiSite\Projects\CommerceBuilder\Stores\StoreSettingDataSource.Generated.cs:263
   CommerceBuilder.Stores.StoreSettingDataSource.LoadForStore() in C:\inetpub\wwwroot\MultiSite\Projects\CommerceBuilder\Stores\StoreSettingDataSource.Generated.cs:204
   CommerceBuilder.Stores.Store.get_Settings() in C:\inetpub\wwwroot\MultiSite\Projects\CommerceBuilder\Stores\Store.Generated.cs:1020
   CommerceBuilder.Stores.Store.GetCachedSettings(Int32 storeId) in C:\inetpub\wwwroot\MultiSite\Projects\CommerceBuilder\Stores\Store.cs:206
   CommerceBuilder.Stores.Store.GetCachedSettings() in C:\inetpub\wwwroot\MultiSite\Projects\CommerceBuilder\Stores\Store.cs:190
   CommerceBuilder.Services.a.c(Object A_0, EventArgs A_1) +1105
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +71


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