HttpContext.Current.Request.ApplicationPath的网站 [英] HttpContext.Current.Request.ApplicationPath for website

查看:392
本文介绍了HttpContext.Current.Request.ApplicationPath的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有虚拟目录下的Web应用程序部署。现在,我们想将它移动到它自己的网站的SSL配置。

we had a web application deployed under virtual directory. Now we want to move it to it's own website for SSL configuration.

不过,也有许多 HttpContext.Current.Request.ApplicationPath 为预期的应用程序不工作的结果。

However, there are lots of HttpContext.Current.Request.ApplicationPath as a result the application is not working as expected.

任何人都可以请帮我有什么替代 HttpContext.Current.Request.ApplicationPath 来找到网站的根?

Could anyone please help me with what's the alternative to HttpContext.Current.Request.ApplicationPath to find root of website?

在虚拟目录设置它给了正确的路径图像,而在网站上它只是给

On virtual directory setup it gives correct path to images whereas on website it just gives

的http://图像

这是不好的。

感谢堆。

推荐答案

您可以试试这个

HttpRuntime.AppDomainAppPath

和替代

HttpContext.Current.Request.PhysicalApplicationPath

这篇关于HttpContext.Current.Request.ApplicationPath的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆