Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a required to download a file from SFTP server and the file downloaded is stored to local folder say "D:\Data\tempData.csv"
I have to read the data from local file and consume in my application for other data manipulation.

This job is created using web hooks scheduler in Azure Web Jobs.

I am unable to download file to azure and then read from there.

Can some one help me to use a location for temp data which is equivalent to "D:\Data\tempData.csv" in local system in the azure environment.

Suggest a place in azure where can I download file and then to read from there.

Thanks in Advance.

What I have tried:

Tried using SSH.NET dll to download file from SFTP to local folder
Again to read from local folder to my application
Tried looking at BLOB storage usage, which was not approved Tech Arch.
Posted
Updated 12-Aug-16 23:34pm
Comments
Afzaal Ahmad Zeeshan 10-Aug-16 6:39am    
Can you tell what problem actually is? Can you download the file, or is the file not downloaded at all?

Secondly, I would try to update my Azure's file system and then guide the client to download the file where I want to download it.
Bhuvanesh Mohankumar 10-Aug-16 8:54am    
I am able to download file from SFTP to my local desktop folder, when I deploy the code to Azure, where can I download file and again read from that folder to the application.
In local say "D:\data" is available, where this folder is not available in azure, I need to know the location to store.
Afzaal Ahmad Zeeshan 10-Aug-16 9:09am    
D is actually the drive, you can create extra folders yourself and then download the file there. Azure doesn't itself delete the content of your application.

Can you try downloading the file to a folder (create the directory if not already created) and then let me know if there are troubles. I will love to help you out in this.
Bhuvanesh Mohankumar 11-Aug-16 7:14am    
Thanks Afzal, yes D is a drive, where I am not able to create any folder of my own using C# code deployed in Azure Web Jobs.

1 solution

In Azure Environment, the "Web-Jobs" are stored in its local folder where known as "D:\home" and "D:\local" is the local folder used by the Web-hooks. I was in need to use a folder for temporary usage of downloading a file from SFTP server and again read the file from that local temporary location file and consume it in my application.

I have used the "D:\local\Temp" as the temporary folder which is created by the code after checking the folder existence, then after creating the folder the code will download a file from server and store to this location and then read from the same location and delete the file from that temporary folder.


Thanks for Afzal & all those who supported.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900