locked
Prevent access to doc,xls,txt files in my IIS Application Root through URL RRS feed

  • Question

  • User330742990 posted

    I have some files mainly txt and pdf files in a folder in Application root. From my web application I write some data into these files and allow users to download it through a Download button in my web page. But someone who know the folder structure of my application can download it through the URL(http://domainname/File/Error.txt) I want to prevent it, any ideas..? My Server is IIS 6.0 My Application ASP.NET(C#) 4.0

    Wednesday, February 13, 2013 3:11 AM

Answers

  • User-1716253493 posted

    Maybe when download clicked then copy the file to temp folder with deferent file name and redirect to the new file.

    Use session end or app end to cleanup the temp folder.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 13, 2013 3:34 AM