开发者

How to upload files to IIS Virtual Directory?

I'm writing a .NET application that needs to upload files. I have presentation, service and data layers. Files get submitted in the Presentation layer (MVC), and then saved by the Data layer. Currently I'm saving files to the file system - C:\SomeDirectory, but I need to save them within the virtual directory in IIS which is managed by Plesk. Did anybody come across any resources explaining how to save files to the virtual directory in IIS?

Should I be uploading files to virtual 开发者_开发问答directory at all?

Thank you!


There isn't anything wrong with saving to a virtual directory as such, but it isn't really meant for that. The best way of saving is to try to get the absolute path of the virtual directory (if outside your site root) if at all possible.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜