无法在 Azure 应用服务文件系统中创建文件



我正在尝试在azure应用程序服务文件系统中创建一个文件。我的应用程序是一个.NET c#应用程序。目前是这样做的:

var tempDirectoryPath = Environment.GetEnvironmentVariable("TEMP");
string filePath = tempDirectoryPath + "myfile.xlsx";

由于某种原因不起作用。。。但它也没有在日志中给我任何错误。有人知道它为什么不创建我的文件吗?

请确认您的权限,尝试使用以下命令:

var tempDirectoryPath = Environment.GetEnvironmentVariable("TEMP");
var filePath = Path.Combine(tempDirectoryPath, Request.Files["file"]);   

最新更新