How to get root folder of ASP.NET application

前端 未结 4 2122
野趣味
野趣味 2021-01-03 09:00

I am trying to get the root folder of the application. I have used the following code, but this gives the bin folder, but what I need is the root folder of the

4条回答
  •  日久生厌
    2021-01-03 09:46

    what is the 'root' folder if not the folder where the exe file is executed from ?
    it could be anything !
    you might want to use Directory.Parent to navigate up the tree, but you have to write the code for that specifically

提交回复
热议问题