Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.
This repository was 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

@galdenny

Description

@galdenny

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions