Azure app service is a webfarm. It does not make sense to write to an upload file to a local folder, as it will only be available from the physical server that uploaded it. You need to use shared storage like azure blob storage.
why using (var fileStream = new FileStream(myPath, FileMode.Create)) not working when app is deployed to Azure App Service?
maytals2001
0
Reputation points
I need help. I am new here I don't even know the proper way to ask
I have an app that saves documents to the wwwroot folder. Locally it works fine, but when deployed to the app service it breaks when it gets to the stament : using (var fileStream = new FileStream(myPath, FileMode.Create))
It says Exception thrown: 'System.IO.DirectoryNotFoundException' in System.Private.CoreLib.dll
Developer technologies | ASP.NET | ASP.NET Core
4,828 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,971 questions
1 answer
Sort by: Most helpful
-
Bruce (SqlWork.com) 78,086 Reputation points Volunteer Moderator
2024-03-11T15:09:39.9133333+00:00