RemoteFileStream::Flush() always throws "Access denied" exception

Sep 11, 2012 at 9:28 AM

Hi there.

Cant figure out what i´m doing wrong but Flush() method of RemoteFileStream throws always "Access denied".

Seems like underlying DeviceFile handle of RemoteFileStream is correct but writing always fails.

stream is opened using parameters:

(FileMode.OpenOrCreate, FileAccess.Write, FileShare.None);

Tried with several different file on different locations (new and existing ones)
but always same result.
Environment:
Application is WinForms app and [MTAThread] defined.
(Win7 64 and Windows CE 42.NET)