Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

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

Open
galdenny opened this issue Jul 26, 2021 · 0 comments

Comments

@galdenny
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant