diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Mvc/MvcContextFactory.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Mvc/MvcContextFactory.cs index 9914eac6..788b22c1 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Mvc/MvcContextFactory.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Mvc/MvcContextFactory.cs @@ -36,7 +36,10 @@ public virtual HttpContextBase CreateHttpContext(ISiteMapNode node, Uri uri, Tex if (writer == null) throw new ArgumentNullException("writer"); - var request = new HttpRequest(string.Empty, uri.ToString(), uri.Query); + var request = new HttpRequest( + filename: string.Empty, + url: uri.ToString(), + queryString: string.IsNullOrEmpty(uri.Query) ? string.Empty : uri.Query.Substring(1)); var response = new HttpResponse(writer); var httpContext = new HttpContext(request, response); return new SiteMapHttpContext(httpContext, node);