Index was outside Error at Microsoft.VisualStudio.

2019-08-04 04:15发布

问题:

I am experiencing the following error. Appreciate any help.

System.IndexOutOfRangeException: Index was outside the bounds of the array. at Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.VirtualPathUtilities.MakeAppRelative(String virtualPath, String appRoot, String& appRelativePath) at Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RenderedRange.Matches(PageExecutionContext otherContext)

Details :

  • Working on a Azure migration from 1.7 SDK to 2.3 SDK for a webrole with asp.net webforms project
  • IDE is Visual studio 2013.
  • Error occurs in the dev environment.

Wonder if this could be anything to do with visual studio 2013 setup or config.

Please help.

回答1:

It was the page inspector that was causing some issue with my project. Added the following in the appSettings of the web.config to resolve the issue

<add key="PageInspector:ServerCodeMappingSupport" value="Disabled"/>