Jerry.Zhong

博客园 首页 新随笔 联系 订阅 管理
        public string GetRootURI()
        {
            string UrlAuthority = Request.Url.GetLeftPart(UriPartial.Authority);
            if (Request.ApplicationPath == null || Request.ApplicationPath == "/")
            {
                //直接安装在Web站点
                return UrlAuthority;
            }
            else
            {
                //安装在虚拟子目录下
                return UrlAuthority + Request.ApplicationPath;
            }
        }
posted on 2009-10-16 14:09  钟先生  阅读(357)  评论(0编辑  收藏  举报