Replying to my own post...
...using the Mutex class appears to be very easy at least, it amounted to precisely three lines of control to provide the locking I need. I just need to work out what the thread blocking issues are now.
I'm not sure that starting a new thread to do the file reading/writing/locking is likely to help as the parent thread would just have to wait for the child to finish before it could do anything useful anyway.
Thankfully as I said performance isn't critical, so as long as waiting on a lock doesn't completely stop all ASP activity the Mutex approach should probably work.
For anyone interested, the three lines in question were:
Code:
Mutex myMutex = new Mutex(false, "OnyxUcf" + fileNameToLock);
myMutex.WaitOne();
// do work
myMutex.ReleaseMutex();
(though I'll obviously need a try/catch/finally in there at the very least)
Still wondering if I can do this sensibly with just file locking instead.