暂时在Web服务上保存文件的位置

时间:2015-07-31 15:36:59

标签: c# web-services

我正在将文件上传到azure Web服务,然后使用该文件进行SOMETHING,然后将其删除。

服务成功接收我发送的数据我似乎无法写入任何位置将文件保存在服务中。

关于我可以临时存储的任何想法? (它在本地工作)

这就是我试过的

string temp2 = System.Web.HttpContext.Current.Request.MapPath(".");
string temp = System.Web.HttpContext.Current.Server.MapPath(".");
FileStream fileToupload = new FileStream(temp2 + "/tempLocation/streamtest.csv", FileMode.Create);

1 个答案:

答案 0 :(得分:4)

也许使用Path.GetTempPath()

另一种方式 - 使用Azure Blob Storage