Posts

Showing posts from January 12, 2019

How to Access Shared Network Drive from Azure webjob

Image
1 1 Getting access denied error when am trying to access shared network drive using UNC path from web job. Am trying to read a file from shared folder and SFTP on client-server. From local, it is working fine being able to access all files. But from azure web job getting access denied error to folder. Here is my code : var con = new ConnectionInfo(host, 22, username, methods.ToArray()); using (var client = new SftpClient(con)) { Console.WriteLine("Connecting to client"); client.Connect(); Console.WriteLine("Connected to client"); Console.WriteLine("Getting file from Azure "); string tstkey1 = File.ReadAllText(@"\{shared folder}testtest.tx