The process cannot access the file NuCache.Conten...
# help-with-umbraco
s
Trying to run a dev site under IIS (I'm using file publish from VS - have created an IIS instance). On boot I get an error: No data for media 1106 Then following that just: The process cannot access the file 'C:\inetpub\wwwroot\Umbracov10\umbraco\Data\TEMP\NuCache\NuCache.Content.db' because it is being used by another process. Seems to work fine running from Visual Studio via IIS Express. The media section works fine (including 1106) but no content will load (tree does) and nothing on the front end but that exception. Anyone seen this before?
This is version 10.5.1
s
If IIS is running the old version of the site it would be in use still, think you need to stop the site during publish.
s
I've done full iis restarts, cleared the TEMP folder, rebooted the laptop, spun in my chair three times and swore a lot. Still the same
s
You didn't stop IIS 😉
s
I have. Just now.
h
As Sebastion says, you should stop the site in IIS, restarting IIS will just restart the sites
s
Is anything written to the DB as a lock.
h
My process is normally 1. Stop site in IIS 2. Clear Temp folder 3. Perform update (of files) 4. restart site in IIS
s
Just restarted the laptop again. Still the same
s
But.. you're deploying to a server, where you get this error?
Did I misunderstand? 😅
If it's local then this is my favorite tool to figure out what's going on! https://lockhunter.com/download.htm
s
Deploying via a file pubish from Visual Studio -> a differnet directory on my laptop to serve via IIS
s
Got it! Well have a look with Lockhunter what's locking that file
h
Also check that your publish is not inadvertantly publishing the umbraco\Data\TEMP folder
s
Huwred - cleared, published, checked it was empty, started iis back up.
And if I kill the locks it goes straight back on page load.
s
Looks like 2 IIS instances trying to access the same cache
s
I've seen iis be weird and corrupty when creating new sites... I'll clear down and try again. Got to pick the child up now.
Ta for the pointers so fa though
OK - for anyone interested - so I've ruled out IIS, ruled out my code (there's a fair amount of stuff in the startup.cs / register - was worried it was something i was doing!) by creating a blank v10.6.1 DB and deploying and hooking up to that. Site starts fine - all my doc types etc come in via uSync and it seems happy. So there must be something in the DB tables of the original dev db... something corrupt in the media table is my theory. I'll do a bit more testing pointing an empty solution at my DB and see if I can recreate it without the solution to definitely rule that out.. odd that is still works under VS though.
s
Super weird! Have you tried to nuke all of the nucache (in the dashboard in the backoffice) and seeing if that helps? Maybe something spins into an infinite loop somewhere
s
Can't get to that screen - I get Server error: Contact administrator, see log for full details. Failed to verify the cache.
OK so this is super weird. If I'm running via VS I can happily view all the media in the media section. Under IIS All top level media items are fine - anything under a folder is throwing an error. All I've done is deploy and copy the media folder over.
OK Dumb question - if I want to pull the Umbraco source and debug this, I'm going to forl v10/main right - contrib is v12?
* fork - I'll foul it no doubt later.
s
Do you think it's permissions? Clearly when you run through VS (which uses either local IISExpress or Kestrel) it works, so I have to assume the IIS setup is wrong. Permissions is the first thing I'd look at as IIExpress and Kestrel run in user mode (have permissions where your current user does), and IIS runs in server mode, so need to set explicit permissions.
Otherwise
v10/dev
to debug against.
s
Had this issues earlier on with an Umbraco 8 upgrade. IIS Express was running two instances of the same site under two different localhost port numbers. It seemed to randomly sort itself out before I got a chance to find a fix…I know it’s not the same framework, but maybe this will point you in the right direction!
18 Views