@Shreyas Rastogi when you move to Azure App Service on a Windows App Service plan, there are some important differences in local storage compared to a traditional Windows server you should be aware of.
Azure App Service provides a limited local storage called "D:\home" or "local storage". This is ephemeral storage that does not persist between app restarts. It has a size limit (around 10-20 GB depending on the App Service plan). Content is not shared across multiple instances if you scale out
If your application relies on local file storage, you'll need to modify your approach. Best practices recommend using Azure Blob Storage or Azure Files for persistent storage. This allows data durability, scalability, and ability to share across multiple app instances
Azure Blob Storage vs. Azure Files
a) Azure Files:
- Can be mounted as a network drive
- Supports SMB protocol
- Minimal code changes required
- Can replace direct file system access with minimal refactoring
b) Azure Blob Storage with Azure StorageHelper libraries:
- Can create abstraction layers to minimize code changes
- Provides similar file access patterns to local file system
Hope that helps. Please let us know if you have further questions
-Grace