【发布时间】:2018-02-27 21:43:57
【问题描述】:
当我尝试将文件保存到 Azure Functions 目录 (D:\home\data\temp\response.pdf) 中的临时存储时,我收到以下错误。为什么我不能写入这个目录?
mscorlib: Exception has been thrown by the target of an invocation. System: An exception occurred during a WebClient request. mscorlib: ***Could not find a part of the path 'D:\home\data\temp\response.pdf'.***
2017-09-19T07:05:24.353 Function completed (Failure, Id=3aa4b740-ba8a-465c-ad7c-75b38fa2a472, Duration=334ms)
2017-09-19T07:06:31 No new trace in the past 1 min(s).
【问题讨论】:
-
当我在本地系统上尝试相同的代码时,它工作正常。
-
请确保
D:\home\data\temp存在。我们可以使用 Kudu 工具(youfunctionappName.scm.azurewebsites.net) 来检查。 -
D:\home\data\temp 文件夹确实存在。从控制台创建的
-
你也可以写到:D:\local\Temp,这个Temp目录对我来说已经存在了。
标签: azure azure-web-app-service azure-functions