首页 > Web开发 > 详细

ABPmvc5服务层获取网站目录

时间:2020-07-18 16:24:03      阅读:92      评论:0      收藏:0      [点我收藏+]

命令

AppDomain.CurrentDomain.BaseDirectory

测试

using System;
using System.Web.Mvc;
using Abp.Web.Mvc.Authorization;
using Castle.Core.Logging;

namespace YinLongWebSite.Web.Controllers
{
    [AbpMvcAuthorize]
    public class HomeController : YinLongWebSiteControllerBase
    {
       
        public ActionResult Index()
        {
            Logger.Debug(AppDomain.CurrentDomain.BaseDirectory);
            return View();
        }
    }
}

输出

DEBUG 2020-07-18 10:54:02,506 [7    ] ngWebSite.Web.Controllers.HomeController - D:\IIS网站\Publish\

技术分享图片

 

ABPmvc5服务层获取网站目录

原文:https://www.cnblogs.com/wangyinlon/p/13334922.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!