How to get virtual directory physical path

前端 未结 6 2232
没有蜡笔的小新
没有蜡笔的小新 2021-01-04 20:55

As we know that a virtual direcoty can be linked to a folder with a diffrent name, how can I get the physical path of a virtual directory ?

I\'ve been trying with Ht

6条回答
  •  灰色年华
    2021-01-04 21:44

    The following should work just fine:

    var physicalPath = HostingEnvironment.MapPath("~/MyVirtualDirectory");
    

提交回复
热议问题