//路径访问绝对地址
string servername = HttpContext.Current.Request.ServerVariables["SERVER_NAME"];
string port = HttpContext.Current.Request.ServerVariables["SERVER_PORT"];
StringBuilder mHttpUrl = new StringBuilder();
mHttpUrl.Append("http://");
mHttpUrl.Append(servername);
if (port.Length > 0)
{
mHttpUrl.Append(":");
mHttpUrl.Append(port);
}
string mServerName = "~/AppModules/Archives/HTMLIMAGE/index.htm";
mHttpUrl.Append(this.Page.ResolveUrl(mServerName));
转载于:https://www.cnblogs.com/wwwzzg168/p/3569967.html