I have created windows virtual machine and mounted Azure file share drive as **Z:**. My storage account name is onegbuploadfileshare and file share name is onefileshare.
I have written a code to write local folder file into Azure file share. (Code Ref: https://learn.microsoft.com/en-us/dotnet/api/overview/azure/storage.files.shares-readme?view=azure-dotnet). Then hosted the application on IIS in windows VM.
But local file not get copied to Azure file share.
My source file path is C:\pubish\Files\1gb.test and destination file path is @"z:\temp\newfile.test" where z drive is mounted drive.
I also programmatically tried with
Dos copy command approach processStartInfo.Arguments = @"/C copy /a C:\pubish\Files\1gb.test \onegbuploadfileshare.file.core.windows.net\onefileshare\temp" or /C copy /a C:\pubish\Files\1gb.test Z:\onefileshare\temp\
ShareClient approach
Az copy approach
But not able to save file to file share in any approach. Code is working for c:\source to c:\dest file copy.
Did I miss something on IIS or code? Can anyone provide the solution.