3

I can access the physical location of a server using Server.MapPath. This gives me the physical path that is inside of wwwroot folder.

I want to Save some data into the other drive of the same server say D: drive. I think I can't get the physical location of D: drive using Server.MapPath because it is outside of the wwwroot folder. So I will hardcoded this location into my project. But now the problem is I want to access the saved data using server url like www.mysite.com/image/myimage.png where image/myimage.png located in D: drive. So I just want to know is it possible or not using asp.net or please suggest what should i do to overcome this problem

4

2 回答 2

5

好的,有几件事:

于 2013-08-13T13:43:32.357 回答
1

这是不可能的,或者任何人都可以制作脚本将文件上传到他想要的任何文件夹。如果您有权访问服务器,请考虑制作应用程序来移动文件。

于 2013-08-13T13:45:08.377 回答