I have disabled directory listing in a folder (named Documents) in my asp.net project with web.config settings below.
It works and http://mywebsite.com/Documents/ does not list the files. But I want the user open a file from this location. For example this link http://mywebsite.com/Documents/file.pdf also gives error.
Is it possible to open a file from a directory which does not allow directory listing. Thanks in advance.
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
</system.webServer>
</configuration>