We're seeing this error in every deployment log for any Linux app service:
My theory is that this is down to the hard-coded backslashes in the lock file path here:
|
get { return System.Environment.ExpandEnvironmentVariables(@"%HOME%\site\locks\" + AutoSwapLockFile); } |
As far as I can see this will cause issues writing to the file on Linux, because I'm assuming that the WriteAutoSwapOngoing method then tries to create a file called home\site\locks\autoswap.lock in the root directory / (which it obviously doesn't have permissions on).
|
File.WriteAllText(autoSwapLockFilePath, string.Empty); |
I also can't see that this autoswap.lock file is then actually used or referenced anywhere else in the codebase? So could this potentially be removed completely?