You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the method MimeMessage.Load(options, filePath) fails when the file is already opened by another process.
This is because you do not specify the FileShare attribute within the File.Open method.
To prevent the issue, modify the code as following:
using (FileStream fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read))
using (FileStream fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read))
Alex.
The text was updated successfully, but these errors were encountered:
Hi,
the method MimeMessage.Load(options, filePath) fails when the file is already opened by another process.
This is because you do not specify the FileShare attribute within the File.Open method.
To prevent the issue, modify the code as following:
using (FileStream fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read))
using (FileStream fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read))
Alex.
The text was updated successfully, but these errors were encountered: