【问题标题】:Azure asp.net - why the webjob %temp% folder is not the same as the web app %temp% folder?Azure asp.net - 为什么 webjob %temp% 文件夹与 web 应用程序 %temp% 文件夹不同?
【发布时间】:2015-10-16 00:34:37
【问题描述】:

我有一个网络作业,它在 %temp% 文件夹中写入一些数据,该文件夹映射到 d:\local\temp。

当我在 azure 门户上使用控制台工具时,数据就在 d:\local\temp 上。

当我尝试访问网站 (asp.net) 上的文件时,这些文件不存在。但是 %temp% 也映射到 d:\local\temp。

为什么?

是否有映射到同一位置的路径?

我在本地 %temp% 上写入的数据是存储在 azure storage blob 上的数据的缓存。如果 %temp% 上的数据丢失,我可以重新创建缓存。

谢谢。

【问题讨论】:

    标签: asp.net azure azure-webjobs


    【解决方案1】:

    主 Web 应用和 Web 作业在同一 VM 上的 2 个不同的沙盒环境中运行。他们可以访问相同的D:\home,但可以访问不同的D:\local

    请记住,D:\homeD:\local 是虚拟化路径。它们实际上并不存在于文件系统中。这就是为什么您可以在同一个 VM 上运行任意数量的站点,并且每个站点都有自己的 D:\homeD:\local

    如果您希望他们通过文件系统共享某些内容,则必须将其放在 D:\home

    【讨论】:

      猜你喜欢
      • 2016-12-31
      • 1970-01-01
      • 2011-04-24
      • 2023-03-17
      • 2022-09-29
      • 1970-01-01
      • 1970-01-01
      • 2019-02-27
      • 1970-01-01
      相关资源
      最近更新 更多