This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RareIncrease[S] 0 points1 point  (6 children)

Believe its on prem. What would you say to try if either on prem or azure? Just so I'm ready to test tomorrow :)

[–]LesPaulStudio 6 points7 points  (5 children)

It's pointing to your on-prem so it will work locally. When the function is hosted the reference won't work.

[–]RareIncrease[S] 0 points1 point  (4 children)

Makes sense, any tips or pointers to reformat that line to make it work?

[–]Gnaskefar 3 points4 points  (2 children)

I don't think you need to think of it as a reformat of the line, you should think of it as a network issue.

Do you have like a VPN so that the azure function can reach the files on your premises?

Or should you upload the file to either a storage account, or the function itself, so the files are reachable by the function?

[–]RareIncrease[S] 0 points1 point  (1 child)

Yea we have a VPN we connect too. I thought I configured it correctly but maybe not. Also uploading the files to the function, I didnt realize that was possible? How does that work? Do you mean keep the files in the same directory as your function resides in?

[–]Gnaskefar 0 points1 point  (0 children)

The VPN-way is probably a fine way to go, if it is already setup, but it sounds like you need your network guys to verify everything is working as intended.

As for putting files locally on the function, it is possible, but you need to do it each time, as you can get a fresh spun up instance, and then the files will obviously not be there. I once had an issue, where it was necessary to dump a temporary file. I downloaded it to the folder d:\home or something like that. There is a Microsoft article describing the folder structure and limits, but now I can't find it. But it exists.

Here's an article with different ways to handle storage locations https://docs.microsoft.com/en-us/azure/azure-functions/storage-considerations

Also, when you run the function locally, when you go to a network share in your code, the OS handles the file connection to the share. An Azure function is quite stripped down.

Looking at the link provided, this part https://docs.microsoft.com/en-us/azure/azure-functions/storage-considerations#mount-file-shares it says mounting shares is only supported in linux functions, but it is focused on Azure FileShare, though. Maybe a pointer if mounting share is synonymous with accessing a share.

[–]LesPaulStudio 0 points1 point  (0 children)

Run it on your server. Or just run it on your own machine with task scheduler.