Question 100


3.3.2 Question

Multiple Choice

You have written a shareware application and want to sell it on your personal website. You are considering various approaches for distributing the application after users purchase it. Which of the following is the best approach?

  • A. Use the FileResult action result to initiate the file download.
  • B. Convert the application to an encoded string and provide it for download through the ContentResult.
  • C. Create a view or partial view that contains an action link to a route in which the user can download the file.
  • D. Create an email containing a link to a route from which the user can download the file.

Answer:

A
Explanation
A. Correct: The FileResult property was designed for this need.
B. Incorrect: The product being distributed is a binary file and does not successfully transition to a string format.
C. Incorrect: Creating a link to download the file through the application just postpones the decision until that link is clicked as it is still going through the application.
D. Incorrect: Creating a link to download the file in an email just postpones the deciĀ­sion until that link is clicked as it is still going through the application.