BugTracker SDK Sample Issues
I have implemented the BugTracker sample into an existing Sitefinity site using the documentation provided in the SDK. When I navigate to the ~\Bugtracker\Project page, I get the following error. If I remove line 5 from the BugTrackerLayout file, the page shows me a sample Project I created. If I click on the sample project, I get another Index was out of range error on page: localhost:39649/.../fbed4ada-1a30-6d3c-9742-ff000024d09a
I have created both a sample project and sample bug. Any ideas what I am missing?
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: indexDescription: 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 3: <html>
Line 4: <head>
Line 5: @Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group.Add("telerik.common.min.css").Add("telerik.windows7.min.css"))
Line 6: </head>
Line 7: <body>
Source File: c:\Program Files (x86)\Telerik\Sitefinity 6.1\Projects\Demo\Areas\BugTracker\Views\Shared\BugTrackerLayout.cshtml Line: 5
Stack Trace:
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.Collections.ObjectModel.Collection`1.set_Item(Int32 index, T value) +14006435
Telerik.Web.Mvc.UI.HtmlHelperExtension.Telerik(HtmlHelper`1 helper) +66
ASP._Page_Areas_BugTracker_Views_Shared_BugTrackerLayout_cshtml.Execute() in c:\Program Files (x86)\Telerik\Sitefinity 6.1\Projects\Demo\Areas\BugTracker\Views\Shared\BugTrackerLayout.cshtml:5
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +125
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +196
System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +208
System.Web.WebPages.WebPageBase.PopContext() +192
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +33
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +240
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
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.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +542
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +299
Error on page localhost:39649/.../fbed4ada-1a30-6d3c-9742-ff000024d09a
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 25:
Line 26:
Line 27: @(Html.Telerik().Grid(Model)
Line 28:
Line 29: .Name("Grid")
Source File: c:\Program Files (x86)\Telerik\Sitefinity 6.1\Projects\Demo\Areas\BugTracker\Views\Bug\BugMaster.cshtml Line: 27
Stack Trace:
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.Collections.ObjectModel.Collection`1.set_Item(Int32 index, T value) +14006435
Telerik.Web.Mvc.UI.HtmlHelperExtension.Telerik(HtmlHelper`1 helper) +66
ASP._Page_Areas_BugTracker_Views_Bug_BugMaster_cshtml.Execute() in c:\Program Files (x86)\Telerik\Sitefinity 6.1\Projects\Demo\Areas\BugTracker\Views\Bug\BugMaster.cshtml:27
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +125
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +196
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +33
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +240
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
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.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +542
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +299
I have been working on getting the BugTracker SDK sample to
work but am still getting an ArgumentNullException error. The following are the steps I have used to
recreate the sample in the SDK.
1. Created new Sitefinity project
2. Copied and added Area files to Project
3. Copied and added Content and Script files to
project
4. Added reference to Telerik.Web.MVC
5. Modified Web.Config to add Assemblies (copy/paste
from Web.config in SDK sample)
6. Ran project and created Dynamic Module for
Project/Bug
7. Navigated to
localhost:1234/.../Project
When I navigate to localhost:1234/.../Project
I get a ArgumentNullException error in BugTrackerLayout.cshtml on the following
line. Any ideas how to get this sample
working?
@Html.Telerik().StyleSheetRegistrar().DefaultGroup(group<
br
>=> group.Add("telerik.common.min.css").Add("telerik.windows7.min.css"))<
br
><
br
>
Hi Michael,
Your detailed explanation is appreciated. From what is present in it I can conclude that you still have some steps to take in order to have a fully functioning BugTracker - namely Displaying the projects and the bugs and Implementing bug logging. Follow the instructions in our documentation and you will be fine.
Regards,Thank you Ivan for your reply. I have reviewed the steps you mentioned. Since I added all of the files from the Area folder to my project, I believe I have created the necessary files listed in the two steps. If I have added these files to my project, is there another step I am missing?
Hello Michael,
After you have completed successfully all of the steps described in our documentation, there should be no problem with your sample.
The only thing I can think of that might be causing problems are the requirements for the sample : ASP.NET MVC 3 , Microsoft .NET Framework 4 and Visual Studio 2010 or newer.
Hello.
I had a similar problem. After searching a bit, I found this:
stackoverflow.com/.../kendo-asp-net-mvc-index-out-of-range-databinding
Adding the following to the web.config file (right before the closing configuration tag) fixed the issue for me:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Good luck.