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 8714839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:41:53+00:00 2026-06-13T05:41:53+00:00

How can I generate a unique download link of a file on Asp.net api?

  • 0

How can I generate a unique download link of a file on Asp.net api? I want to provide a download feature via webservice, each user just got a unique download link at a time.

UPDATE:

  • I dont want to waste time of user for login.

  • One user can download multiple file.

  • The file type can be xml, image, text and sound file.

    I am trying to develop an application which sell ebook.

Thanks a lot

  • 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-13T05:41:54+00:00Added an answer on June 13, 2026 at 5:41 am

    Can you give us more details what exactly you are trying to achieve.

    1. I would like to know if users are registered?
    2. Will same user download more than 1 file?
    3. What type of file?

    any other scenario you can tell us?

    It can be dont in many ways depending upon your scenario.

    look for this example & will send you more
    http://support.microsoft.com/kb/306654

    One way of doing it if it fits your scenario

    While you could use a GUID and maybe relate it to your user in your database, you would need to create some business logic around how that GUID is excepted by your application. For example you might say UserA has a GUID, if that GUID is used in the next 15 minutes let UserA log in automatically but after 15 minutes force the user to use a username and password.

    Similarly you could make a query string, something like u=UserA&time=1347&date=01282001 and then run it through a hash of some sort. When it comes back in, unhash it (so you couldn’t use MD5), check the time stamp and see how long it has been since that timestamp was created. If it is within an acceptable time frame, let the user enter, if not force them to use a username and password. This would not require you to relate anything with your user in your database, so may be a more simple solution compared to a GUID.

    Update: If i had to do it then i will take up following approach. It is up to you how you will protect these files from download.

    Step 1: I will create a new table & generate a GUID once user make payment & store guid & userID, BookID information in this table. Now you can generate a link based on this information

    http://www.xyz.com/download.aspx?BookID=XX&UserID=XXX&GUID=guid-guid-guid-guid-guid-guid
    

    Step 2: Create a HTTPHandler to check if such record is present in the table you created above if so then allow the user to download the book otherwise he should not be able to download the book.

    You can keep all downloadable file under FOLDER which user dont have direct access.

    I hope you understand what i am trying to say.

    This is how i would do, I can either keep all files in protected folder or store them in DATABASE.

    i hope this will give you a starting point.

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

Sidebar

Related Questions

I want to generate unique number for each of my site users. How can
I want to generate unique random, N-valued key. This key can contain numbers and
ASP.NET MVC 3 can generate scaffold code for us(controllers and views). The generated views
ASP.NET MVC can generate HTML elements using HTML Helpers, for example @Html.ActionLink() , @Html.BeginForm()
I want to generate unique hexadecimal numbers in SQL. How can I do this?
Can any one suggest the best practice to generate unique file names for file
I want to generate unique and random numbers or IDs which I can use
How can I generate some unique random numbers between 1 and 100 using JavaScript?
I can generate my models and schema.yml file based on an existing database. But
I found jquery can generate file tree structure based on existing folders and files

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.