I found out about the new Feature from .NET 6 and onwards "Shadow Copy". With just enabling it and setting a Folder for the Shadow copy, the whole Application Folder is copied. If my Application has some Files inside this Folder which dont need to be "shadow copied", is it currently possible to exclude some folders/files? Or do i need to move those files to a different folder outside the hosted IIS Application. That would mean tho, that i would need to set up permissions for the server to be able to access them and serve them to the web, right?
Volume shadow copy cannot exclude certain files or folders. As you said, you can move these files to other folders outside of hosting the IIS application, and required administrative privileges.
You may try to use the FilesNotToSnapshot registry key to specify the files that you want to exclude from shadow copies. The developer of a VSS writer or application may choose to exclude certain files from shadow copies. A VSS writer can exclude files from a shadow copy as follows:
You can refer to the official doc for Excluding Files from Shadow Copies: https://learn.microsoft.com/en-us/windows/win32/vss/excluding-files-from-shadow-copies#using-the-addexcludefilesfromsnapshot-method.