Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disk caching is not working when deploying the application using zip deploy #276

Open
koljada opened this issue Jun 23, 2023 · 1 comment

Comments

@koljada
Copy link

koljada commented Jun 23, 2023

When I deploy my asp net 6 application using web deploy everything works fine. But when I deploy it using zip deploy disk caching is not working: I receive 500 errors for my static files. I had to set enableDiskCache to false to keep my production site running.
I use AzureRmWebAppDeployment@4 azure devops task for deployment which by default use zip deploy and set following env variables: WEBSITE_RUN_FROM_PACKAGE=1 and WEBSITE_ENABLE_SYNC_UPDATE_SITE=true.

Is it not possible to use disk caching with zip deployment? If so, then I think it should be mentioned in docs

@MatthewSteeples
Copy link

While you can't write to the wwwroot folder, there are other folders that you can use on the App Service. See details for Windows (I'm not sure if there's a page for Linux deployments, but you can create files and folders in /tmp)

You can set the folder that the disk cache uses: WebOptimizerOptions.CacheDirectory in code or have a look at the main page for json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants