// get url to the created file public static string GetCreateUrl(FileUtility.FileType fileType) { var createUrl = new UriBuilder(GetServerUrl(false)) { Path = HttpRuntime.AppDomainAppVirtualPath + (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/") + "Sample", Query = "fileExt=" + DocManagerHelper.GetInternalExtension(fileType).Trim('.') }; return(createUrl.ToString()); }