You have no items in your shopping cart.

Profile: steve@sitesee.net

Avatar
Statistics

    The only groups that do not have at least 12 characters are defined in my if/else condition, so I cannot understand why it encounters any situation in which the count parameter is seen as zero or null.

    Any ideas why it fails now?

    Thanks,
    Steve

    10 years ago

    The error:

    Index and count must refer to a location within the string. Parameter name: count

    System.ArgumentOutOfRangeException: Index and count must refer to a location within the string. Parameter name: count at System.String.RemoveInternal(Int32 startIndex, Int32 count) at ASP._Page_Plugins_FoxNetSoft_Articles_Views_ArticleRead_List_cshtml.Execute() in c:\inetpub\wwwroot\MFS_DEV_3point4\Plugins\FoxNetSoft.Articles\Views\ArticleRead\List.cshtml:line 99 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.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)

    It is referring to this line:
    string sLess = s.Remove(0, 12);

    The only groups that do not have at least 12 characters are defined in my if/else condition, so I cannot understand why it encounters any situation in which the cou

    10 years ago

    Since the problem I am now having is related to upgrading, I will just continue on this thread:

    On the /Views/ArticleRead/List.cshtml, I have custom code to manipulate the description string data. It worked fine on 3.3, but for some reason, now I have errors. My code:


    <div class="description">
       @{
        string strbody = item.ShortBody;
        string group = Model.ArticleGroupName;
        var thestrbody = " ";

        if (group.Contains("Spacial Orientation")||group.Contains("Topography")||group.Contains("Osteology")||group.Contains("Angiology")||group.Contains("Neurology")||group.Contains("Myology")||group.Contains("Radiology")||group.Contains("Misc. Drawings")||group.Contains("Clinical Testing"))
            {
            thestrbody = strbody;
            }
        else
            {
            string s = item.ShortBody;
            string sLess = s.Remove(0, 12);
            int index = sLess.IndexOf("Summary");
            thestrbody = (sLess.Substring(index + 8));
            }
        }
       @thestrbody
        
           @if (group.Contains("Spacial Orientation")||group.Contains("Topography")||group.Contains("Osteology")||group.Contains("Angiology")||group.Contains("Neurology")||group.Contains("Myology")||group.Contains("Radiology")||group.Contains("Misc. Drawings")||group.Contains("Clinical Testing"))
      {
          @*   do nothing  *@
      }
            else
            {
      <span class="skyblue-links">
      <a class="article-title" href="@Url.RouteUrl("ArticlePost", new { SeName = item.SeName })">@T("FoxNetSoft.Plugin.Misc.PageTitle.NextRead")</a>
      </span>
            }


    I will post the error on next reply because field is too small

    10 years ago

    Well...nevermind...the page loads now...the initial error must have not been critical...

    10 years ago

    Hello-

    I created a new installation of 3.40 nopcommerce and installed the updated articles plugin. When I first restarted my site, I got this error in the Windows application log:

    [code]Event code: 3005
    Event message: An unhandled exception has occurred.
    Event time: 7/28/2014 1:16:10 AM
    Event time (UTC): 7/28/2014 8:16:10 AM
    Event ID: 6af103f79a1642b19a0ee46090c49dd5
    Event sequence: 4
    Event occurrence: 1
    Event detail code: 0

    Application information:
        Application domain: /LM/W3SVC/11/ROOT-1-130510088527885000
        Trust level: Full
        Application Virtual Path: /
        Application Path: C:\inetpub\wwwroot\MFS_DEV_3point4\
        Machine name: WIN-DDE4FB9847H

    Process information:
        Process ID: 5564
        Process name: w3wp.exe
        Account name: IIS APPPOOL\MFS_DEV

    Exception information:
        Exception type: HttpException
        Exception message: There is already an object named 'FNS_Article_GetRelatedArticlesByProductId' in the database.
    -------------------------------------

    ..now get error when viewing /articles:

    Index and count must refer to a location within the string. Parameter name: count
    System.ArgumentOutOfRangeException: Index and count must refer to a location within the string. Parameter name: count at System.String.RemoveInternal(Int32 startIndex, Int32 count) at ASP._Page_Plugins_FoxNetSoft_Articles_Views_ArticleRead_List_cshtml.Execute() in c:\inetpub\wwwroot\MFS_DEV_3point4\Plugins\FoxNetSoft.Articles\Views\ArticleRead\List.cshtml:line 97 at System.Web.WebPages.WebPageBase.ExecutePageHierarc

    .... so I tried restarting the application again, but still http://64.239.149.226/articles  will not load...same error.

    How can I fix this?

    Thanks,
    Steve

    10 years ago

    Powered by nopCommerce

    Copyright © 2023 FoxNetSoft. All rights reserved