Does IIS 6/7 lock image files whilst they're being served?

后端 未结 5 407
清歌不尽
清歌不尽 2021-01-14 06:58

I am writing a piece of .NET code which needs to overwrite image files in a website hosted on IIS 6 or 7. The only processes that should be touching the images are IIS and m

5条回答
  •  抹茶落季
    2021-01-14 07:16

    By serving means, I assume its reading the files and delivering to clients(browser). For this opration it is not at all needed to lock the file. So We can assume that it is opening the file in Read mode. IIS uses TransmitFile() API to send files over sockets. It is using OS internal cache for performance and should not lock the file.

    we can view which file is opened by what process using processexplorer from sysinternals. This would help you to find if its actually opened by any other process.

提交回复
热议问题