Based on this SO answer: https://stackoverflow.com/a/2066040/458354 I have a web.config that defines a custom HttpHandler for all files in a subdirectory, placed in my static file subdirectory. This works perfectly if the directory, even when configured as virtual, is on the same server as IIS. However, if the virtual directory points to a shared folder on another server, I receive this error when accessing a static resource: "An error occurred loading a configuration file: Invalid file name for file monitoring: '\\remoteserver\remotedir\web.config'."
I've even granted permissions on the remote directory to the IIS_IUSR from the webserver. I suspect the problem is the config path being a share. Any thoughts on an way to allow the virtual dir web.config to be read by IIS?
Alternatively, is there a way to configure the handler path in the site's normal web.config to cover an entire subdirectory?
Config line in question:
<add name="MyRequestHandler" type="MyApp.StaticFileRequestHandler,
MyApp" path="*" resourceType="Either" verb="GET,HEAD"
requireAccess="Read"/>