Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8628983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:41:25+00:00 2026-06-12T08:41:25+00:00

I have some PDFs uploaded by the user and they are saved on hard

  • 0

I have some PDFs uploaded by the user and they are saved on hard drive. Those PDFs should actually only be visible by the user who uploaded. But at the moment it is not secure. If somebody guesses the name of the PDF, it can be viewed by anybody else too.

Eg: http://www.something.com/PDFs/abcghjiekm.PDF

This is a security threat. What I’d like to be able to do is have some kind of logic that processes the request to these PDFs and compare it with my DB to see if this PDF is actually belonging to the user who requested it. How can I do that?

Edit: I cannot use FileStream as my website is already up and running. I don’t want to change all of the codebase and go into each and every aspx page to hunt where the PDFs are accessed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:41:26+00:00Added an answer on June 12, 2026 at 8:41 am

    You could handle PDF through an special HttpHandler in IIS instead of the StaticFile-Handler and check for Access-Rights.

    IF you are using MVC a route like /PFDs/{file}.pdf with an Controller returning Content will do.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that manages multiple magazine PDFs on the hard drive. I
Let's say I have a collection of PDF files with the following paths: /some/path/pdfs/birds/duck.pdf
I have a repository for storing some large binary files (tifs, jpgs, pdfs) that
I have a MonoTouch application that generates some PDFs locally and then prints them
I have some files stored in a directory on the server application. Actually, this
I have reports that are being converted into PDFs. Some of these reports have
I have a spring mvc application and I am rendering some pdfs using classes
I have tons PDFs that I need to convert to some structured format that
I have to print out some PDFs for a project at work. Is there
I have a php script that does some processing (creates remittance advice PDFs, self-billing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.