Thank you soooo much ToonKides
I am getting somewhere with this. I've added the above to ISS, thank you this seems to work i.e it's does prevent direct access to .pdf's.
But authorised users are seeing this error:
The page cannot be displayed
You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.
Please try the following:
- Contact the Web site administrator if you believe this directory should allow execute access.
HTTP Error 403.1 - Forbidden: Execute access is denied.
Internet Information Services (IIS)
Technical Information (for support personnel)
- Go to Microsoft Product Support Services and perform a title search for the words HTTP and 403.
- Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Configuring ISAPI Extensions, Configuring CGI Applications, Securing Your Site with Web Site Permissions, and About Custom Error Messages.
- In the IIS Software Development Kit (SDK) or at the MSDN Online Library, search for topics titled Developing ISAPI Extensions, ISAPI and CGI, and Debugging ISAPI Extensions and Filters.
This is what I've added to my .config file, have I missed anything?
<location path="membersArea/pdf/superUserGuide.pdf">
<system.web>
<authorization>
<allow roles="superUser,globalUser,adminUser,occUser,managerUser"/>
<deny users="?" />
</authorization>
<httpHandlers>
<add path="*.pdf" verb="GET,HEAD,POST,DEBUG" type="System.Web.DefaultHttpHandler" validate="true"/>
</httpHandlers>
</system.web>
</location>
Thanks ever so much