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企业应用研发
查看全文
相关阅读:
Python入门系列——第20篇
Python入门系列——第19篇
windows下python使用pip命令安装builtwith库时,遇到的utf-8问题的解决
Python入门系列——第18篇
在相同的主机上创建一个duplicate数据库
duplicate database的时候,rman连接 auxiliary database的后状态不正确
使用duplicate target database ... from active database复制数据库
RHEL7
Oracle 监听器日志文件过大导致监听异常
TNS-01251: Cannot set trace/log directory under ADR
原文地址:https://www.cnblogs.com/syveen/p/292489.html
最新文章
aa
mysql 基础教程
Linux
阿里云 LAMP 使用基础
我所理解的RESTful Web API [设计篇]
我所理解的RESTful Web API [Web标准篇]
你(可能)不知道的web api
vue开发computed,watch,method执行的先后顺序
css控制默认滚动条样式
[转]如何在 JS 代码中消灭 for 循环
热门文章
Array.reduce()方法的使用
javascript中的 !~
vue-router在IE11中页面不跳转
JavaScript 复杂判断的更优雅写法
8051微控制器简介
把数字用拼音表示并输出
求第n个素数到第m个素数的和
C语言复习(二)
C语言复习(一)
计算一个整数二进制位中1的个数
Copyright © 2011-2022 走看看