public string MapPath(string virtualPath) { // Need to prevent extra slashes string prefix = ApplicationPath.EndsWith("/", StringComparison.OrdinalIgnoreCase) ? "~/" : "~"; return(virtualPath.Replace(prefix, ApplicationPath)); }
private string GetPath(string root, Module module) { var fullpath = root; if (!ApplicationPath.EndsWith("/")) { fullpath = string.Concat(fullpath, "/"); } fullpath = string.Concat(fullpath, module.GroupUrl.Trim('/'), "/"); fullpath = string.Concat(fullpath, module.Url.Trim('/')); return(ResolveUrl(fullpath)); }