How do I get the current directory in a web service

前端 未结 7 832
情歌与酒
情歌与酒 2020-12-09 08:04

I am using System.IO.Directory.GetCurrentDirectory() to get the current directory in my web service, but that does not give me the current directory. How do I get the curren

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-09 08:18

    You can use

    AppDomain.CurrentDomain.BaseDirectory;
    

    This gives you the root directory of your application.

提交回复
热议问题