AlphaFS icon indicating copy to clipboard operation
AlphaFS copied to clipboard

System.IO.IOException: (6801) Transaction support within the specified resource manager is not started or was shut down due to an error

Open galdenny opened this issue 4 years ago • 0 comments

Hello,

I have a special case with transactional writing a file on a USB storage formated to NTFS. If the storage is plugged, it will be mounted in another NTFS folder: D:\SomeFolder\Mount\USB1

I want to write a file on this storage with the following line:

using (var ts = new Alphaleonis.Win32.Filesystem.KernelTransaction())
            {
                Alphaleonis.Win32.Filesystem.File.WriteAllTextTransacted(ts, path, content);

                ts.Commit();
            }

The problem is, that at least 10% of all cases the resource manager for the Tx support is not present, and I get this error message: System.IO.IOException: (6801) Transaction support within the specified resource manager is not started or was shut down due to an error.

After removing and re-plugging the USB stick the problem disappears in most of the cases.

Can someone please point me to the right direction?

Thank you in advance

galdenny avatar Jul 26 '21 12:07 galdenny