zoukankan
html css js c++ java
如何用c#获得当前站点的根路径
public
string
GetRootPath()
{
//
是否为SSL认证站点
string
secure
=
HttpContext.Current.Request.ServerVariables[
"
HTTPS
"
];
string
httpProtocol
=
(secure
==
"
on
"
?
"
https://
"
:
"
http://
"
);
//
服务器名称
string
serverName
=
HttpContext.Current.Request.ServerVariables[
"
Server_Name
"
];
string port = HttpContext.Current.Request.ServerVariables["SERVER_PORT"];
//
应用服务名称
string
applicationName
=
HttpContext.Current.Request.ApplicationPath;
return httpProtocol + serverName + (port.Length > 0 ? ":" + port : string.Empty) + applicationName;
}
愿一路奔跑不退缩,到目前一直从事.Net的B/S,C/S企业应用研发
查看全文
相关阅读:
洛谷P1865 A%B Problem
树状数组的操作
树状数组的基础知识
卡常优化中最为奇怪的操作
inline的用法
快速读入的方法
P1059 明明的随机数及unique去重的用法
P3376 网络最大流 【模板】
Gym
HDU
原文地址:https://www.cnblogs.com/syveen/p/292489.html
最新文章
14、序列化操作,类的保存和dict转JSON
13、文件读写操作
12、python单步调试工具pdb
11、面向对象的编程
10.函数式编程
9、str类型和byte类型转换、列表拾遗、元组拾遗、字典拾遗、如何判断对象是否可迭代
8、for 、emumrate、range、if
7、字典的基本方法
6、元组的基本方法
5、list列表常用方法说明
热门文章
Centos:Eclipse+PyDev搭建Python开发环境
LoadRunner:页游压力测试
XAMPP+PhpWind环境搭建
LoadRunner11:确保参数化时参数调用的唯一性
VisualVM
EBCDIC Translation
贪心算法
P1325雷达安装
一本通1423 种树
区间选点问题简述
Copyright © 2011-2022 走看看