获取站台根路径
来源:互联网 发布:有必要买ipad吗 知乎 编辑:程序博客网 时间:2024/04/27 15:35
/// <summary>
/// 获取路径
/// </summary>
/// <returns></returns>
public string GetRootURI()
{
string AppPath = "";
HttpContext HttpCurrent = HttpContext.Current;
HttpRequest Req;
if (HttpCurrent != null)
{
Req = HttpCurrent.Request;
string UrlAuthority = Req.Url.GetLeftPart(UriPartial.Authority);
if (Req.ApplicationPath == null || Req.ApplicationPath == "/")
{
AppPath = UrlAuthority;
}
else
{
AppPath = UrlAuthority + Req.ApplicationPath;
}
}
return AppPath;
}
/// 获取路径
/// </summary>
/// <returns></returns>
public string GetRootURI()
{
string AppPath = "";
HttpContext HttpCurrent = HttpContext.Current;
HttpRequest Req;
if (HttpCurrent != null)
{
Req = HttpCurrent.Request;
string UrlAuthority = Req.Url.GetLeftPart(UriPartial.Authority);
if (Req.ApplicationPath == null || Req.ApplicationPath == "/")
{
AppPath = UrlAuthority;
}
else
{
AppPath = UrlAuthority + Req.ApplicationPath;
}
}
return AppPath;
}
- 获取站台根路径
- 获取前端根路径
- springmvc 获取根路径
- Java5泛型的用法,T.class的获取和为擦拭法站台
- Java5泛型的用法,T.class的获取和为擦拭法站台
- Java5泛型的用法,T.class的获取和为擦拭法站台
- Java5泛型的用法,T.class的获取和为擦拭法站台
- Java5泛型的用法,T.class的获取和为擦拭法站台
- Java5泛型的用法,T.class的获取和为擦拭法站台
- 获取项目根路径和获取当前类的路径
- JS获取网站根路径
- js获取项目根路径
- java获取项目根路径
- js获取项目根路径
- js获取项目根路径
- js获取项目根路径
- js获取项目根路径
- js获取项目根路径
- Jmeter脚本录制-与Badboy合用
- linux下用GDB调试可加载模块
- Java程序员应该知道的10个调试技巧
- ArcGIS Engine 编辑- ITask
- shell编程学习之xargs
- 获取站台根路径
- 层次遍历二叉树
- C#获取当前屏幕大小或任务栏的大小,不用API
- java.lang.NullPointerException: println needs a message
- c++中绝对值函数所在头文件
- 进程通信:信号通信之SIGSTOP和SIGCONT测试
- Android复制Assets中大于1M的Zip压缩包,并解压到SD卡中
- jquery的淡入,淡出事件 fadeIn fadeOut
- IOS下横屏方法,4.x,5.x 6.x童叟无欺