Getting the following error when the console application try to upload the document from the file share to Office 365 document library.
Unhandled Exception: System.UnauthorizedAccessException: Access to the path '\\SAJITH\Attachment' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at O365Scheduler.Program.o365SaveBinaryDirect(ClientContext o365Context, String o365LibraryName, String o365FilePath, String o365FileName) in D:\VS2015 Projects\ClientProjects\O365Scheduler\O365Scheduler\O365Scheduler\Program.cs:line 78
at O365Scheduler.Program.Main(String[] args) in Program.cs:line 17