asp.net mvc 获取网站的BasePath
public string BasePath
{
get
{
string ip_port = Request.Url.GetLeftPart(UriPartial.Authority);
if (!string.IsNullOrWhiteSpace(ip_port) && ip_port.Contains("62.155.197.173"))
{
ip_port = "http://62.155.197.173:1888";
}
string basePath = ip_port + "/";
return basePath;
}
}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。