Hi, I'm getting an error loading http://oes.com.qa. Can you take a look at my global.asax.cs file? I have pored over the code but I cannot figure what needs to get changed to get rid of the error.
You can view the post at the bottom of https://social.msdn.microsoft.com/Forums/en-US/21c219ec-a9da-45c2-8a05-af484590c565/update-error-length-cannot-be-less-than-zero-parameter-name-length?forum=vbgeneral
All help is greatly appreciated. Thank you
The error message is:
Server Error in '/' Application.
Length cannot be less than zero.
Parameter name: length
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: Length cannot be less than zero.
Parameter name: length
Source Error:
Line 506: bool checkParameters = false;
Line 507:
Line 508: URLRewritingResultEnum status = URLRewriter.RewriteUrl(relativePath, excludedEnum, siteName, viewMode);
Line 509: switch (status)
Line 510: {
Source File: f:\hostingspaces\oryxcom1\oes.com.qa\wwwroot\App_Code\Global.asax.cs Line: 508
Stack Trace:
[ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length]
System.String.Substring(Int32 startIndex, Int32 length) +13025523
CMS.PortalEngine.PageInfoProvider.GetDataForPageInfoForUrl(String url, String cultureCode, String defaultAliasPath, Boolean combineWithDefaultCulture, Boolean isDocumentPage, GeneralConnection conn, PageInfoSource& source, String& wildcardQueryString) +456
CMS.PortalEngine.PageInfoProvider.GetPageInfoForUrl(String url, String cultureCode, String defaultAliasPath, Boolean combineWithDefaultCulture, Boolean isDocumentPage, GeneralConnection conn, PageInfoSource& source, String& wildcardQueryString, String siteName) +502
CMS.PortalEngine.PageInfoProvider.GetPageInfoForUrl(String url, String cultureCode, String defaultAliasPath, Boolean combineWithDefaultCulture, Boolean isDocumentPage, GeneralConnection conn, PageInfoSource& source, String& wildcardQueryString) +46
CMS.URLRewritingEngine.URLRewriter.RewriteUrl(String relativePath, ExcludedSystemEnum excludedEnum, SiteNameOnDemand siteName, ViewModeOnDemand viewMode) +4592
Global.RewriteUrl(String relativePath, ExcludedSystemEnum excludedEnum, ViewModeOnDemand viewMode, SiteNameOnDemand siteName) in f:\hostingspaces\oryxcom1\oes.com.qa\wwwroot\App_Code\Global.asax.cs:508
Global.Application_AuthorizeRequest(Object sender, EventArgs e) in f:\hostingspaces\oryxcom1\oes.com.qa\wwwroot\App_Code\Global.asax.cs:301
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.3282.0