Error: The process cannot access the file '(some file)' because it is being used by another process
Hello everyone,
Is anyone else getting this error on Umbraco Cloud (7.6.5) when overwriting a media file (PDF for example) and trying to transfer it to live?
This is the full error I get:
(RemoteApiException) System.IO.IOException: The process cannot access the file 'C:\inetpub\temp\DWASFil(...shortened...)fundgrants_guideline_en.pdf' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at System.IO.File.Delete(String path)
at Umbraco.Core.IO.PhysicalFileSystem.AddFile(String path, String physicalPath, Boolean overrideIfExists, Boolean copy)
at Umbraco.Core.IO.ShadowFileSystem.Complete()
EDIT: Just realised this is in the Umbraco Cloud tag, and I am not using Umbraco Cloud.
Did anyone ever find a fix for this? I tried manually ending all processes (and background processes) related to .net core. After that didn't work, a computer restart should have released it, but the issue remains. Which means maybe there's a race condition somewhere on build??
On Umbraco 9.0.1
Failed to build InMemory models.
The process cannot access the file 'A:\AppData\Local\Temp\.COMP.Matt.log.INFO.20211014-070355.3568' because it is being used by another process.
at System.IO.FileSystem.DeleteFile(String fullPath)
at System.IO.File.Delete(String path)
at Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryModelFactory.TryDeleteUnusedAssemblies(String dllPathFile)
at Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryModelFactory.GetModelsAssembly(Boolean forceRebuild)
at Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryModelFactory.EnsureModels()
The problem seems to be resolved (At least for now). From what I can tell it's an issue with VS permissions or config. I did two things:
I changed VS to always open as an Administrator
Tools -> Options -> Projects and Solutions -> Unticked "Stop debugger when browser window is closed, close browser when debugging stops"
I think the second item is the actual culprit. Even after the restart that I did Firefox was opened and had localhost:1234 open (of course nothing showed because the localhost server wasn't started yet) before trying to build. I think that was halting something somewhere along the line because the resource was already open and with that VS option selected it can't make another. But that's just theory, now that it's working I really have no motivation to investigate it further ^.^'
Error: The process cannot access the file '(some file)' because it is being used by another process
Hello everyone,
Is anyone else getting this error on Umbraco Cloud (7.6.5) when overwriting a media file (PDF for example) and trying to transfer it to live?
This is the full error I get:
Thank you! Genc
Hi,
Having the same issue from time to time. Umbraco 7.7.3
Thanks, Mike
I been running into the same issue from time to time. Running Umbraco version 7.7.1.
Happens occasionally in admin panel, affecting files in App_Data/preview.
This is still an issue on Deploy3.3.0/Umbraco8.5.3
--sad panda face here--
EDIT: Just realised this is in the Umbraco Cloud tag, and I am not using Umbraco Cloud.
Did anyone ever find a fix for this? I tried manually ending all processes (and background processes) related to .net core. After that didn't work, a computer restart should have released it, but the issue remains. Which means maybe there's a race condition somewhere on build??
On Umbraco 9.0.1
The problem seems to be resolved (At least for now). From what I can tell it's an issue with VS permissions or config. I did two things:
I think the second item is the actual culprit. Even after the restart that I did Firefox was opened and had localhost:1234 open (of course nothing showed because the localhost server wasn't started yet) before trying to build. I think that was halting something somewhere along the line because the resource was already open and with that VS option selected it can't make another. But that's just theory, now that it's working I really have no motivation to investigate it further ^.^'
is working on a reply...