+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / BugTracker SDK Sample Issues

BugTracker SDK Sample Issues

6 posts, 0 answered
  1. Michael
    Michael avatar
    13 posts
    Registered:
    25 Aug 2008
    23 Sep 2013
    Link to this post
    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: http://localhost:39649/Demo/BugTracker/Bug/Index/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 http://localhost:39649/Demo/BugTracker/Bug/Index/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
  2. Michael
    Michael avatar
    13 posts
    Registered:
    25 Aug 2008
    25 Sep 2013 in reply to Michael
    Link to this post
    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
    http://localhost:1234/BugTracker/Project

     When I navigate to http://localhost:1234/BugTracker/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>
    Here is the stack trace. 


    System.ArgumentNullException was unhandled by user code

      HResult=-2147467261

      Message=Value cannot
    be null.

    Parameter name: item

      Source=System.Web

      ParamName=item

      StackTrace:

           at
    System.Web.Routing.RouteCollection.SetItem(Int32 index, RouteBase item)

           at
    System.Collections.ObjectModel.Collection`1.set_Item(Int32 index, T value)

           at
    Telerik.Web.Mvc.UI.HtmlHelperExtension.Telerik[TModel](HtmlHelper`1 helper)

           at
    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:line
    7

           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.WebPages.WebPageBase.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter
    writer)

           at
    System.Web.WebPages.HelperResult.WriteTo(TextWriter writer)

           at
    System.Web.WebPages.WebPageBase.Write(HelperResult result)

           at
    System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName,
    Action`1 body)

           at
    System.Web.WebPages.WebPageBase.PopContext()

           at
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext
    pageContext, TextWriter writer, WebPageRenderingBase startPage)

           at
    System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer,
    Object instance)

           at
    System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext,
    TextWriter writer)

           at
    System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)

           at
    System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext
    controllerContext, ActionResult actionResult)

           at
    System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17()

           at
    System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter
    filter, ResultExecutingContext preContext, Func`1 continuation)

      InnerException:
  3. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    25 Sep 2013
    Link to this post
    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,
    Ivan D. Dimitrov
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  4. Michael
    Michael avatar
    13 posts
    Registered:
    25 Aug 2008
    26 Sep 2013 in reply to Ivan D. Dimitrov
    Link to this post
    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?   
  5. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    01 Oct 2013
    Link to this post
    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. 

    Regards,
    Ivan D. Dimitrov
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. James
    James avatar
    1 posts
    Registered:
    23 Sep 2013
    14 Oct 2013
    Link to this post
    Hello.

    I had a similar problem. After searching a bit, I found this:
    http://stackoverflow.com/questions/15386380/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.
6 posts, 0 answered