I take look at IIS handlers. IIS handler has resourceType
<add path="*.csv" modules=... resourceType="Unspecified" />
Which performs option "Invoke handler only if request is mapped to:" from IIS console. The attribute can contain next options:
Unspecified
File
Directory
Either
Is there a way to call handler only if request is not mapped to ...?
I need uris like '/export/gdp-201507.csv' and call the handler in the case 'uri is not mapped to the file', 'file does not exists' and the handler will create the file. I can do it using 404 error handling, but this is non-standard complicated situation, 404 handler is only one per all type of handlers, it is slower than handler, hardly to debug...