This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.
When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:
When making a request to the virtual root (without a trailing slash) under IIS, the following exception is thrown:
[ArgumentOutOfRangeException: startIndex cannot be larger than length of string. Parameter name: startIndex] System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +10080140 System.String.Substring(Int32 startIndex) +19 mojoPortal.Web.UrlRewriter.RewriteUrl(HttpApplication app) in D:\Projects\KRB\MojoPortal\Web\Components\UrlRewriter.cs:133 mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e) in D:\Projects\KRB\MojoPortal\Web\Components\UrlRewriter.cs:71 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
That is line 133 of UrlRewriter.cs: string targetUrl = requestPath.Substring(appRoot.Length + 1);
which can be rewriiten to fix:
string appRoot = WebUtils.GetApplicationRoot(); if (requestPath.Length == appRoot.Length) return; string targetUrl = requestPath.Substring(appRoot.Length + 1);
Example of url that causes exception: http://localhost/mojo (fails) as opposed to http://localhost/mojo/ (succeeds).
Hi,
Thanks for the bug report and the fix. I've just committed the change to svn trunk.
Best,
Joe