My ASP.NET-application is generating static files that can then be accessed by the user directly, e.g. https://example.com/usercontent/xyz.pdf
Currently, this is achieved by writing the generated files directly into the phyiscal directory inside the web-application (like D:\Path\To\Webapp\usercontent\xyz.pdf) and let the user access them via the URL. Unfortunately, the directory on the drive is deleted during each deployment of the application. Is it possible to remap URLs containing this folder to another physical location by using the web.config only?
This way, the deployment would not clean it each time it runs.