PrepAway - Latest Free Exam Questions & Answers

You need to store state and configure the application

DRAG DROP
You are developing an ASP.NET MVC application in a web farm. The application has a page that accepts a
customer’s order, processes it, and then redirects the browser to a page where the order is displayed along
with the shipping information.
The order information should be available only to the page where the order is displayed.
You need to store state and configure the application.
What should you do? To answer, drag the appropriate item to the correct location. Each item may be used
once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:
Target 1: InProc
Target 2: ViewData
* InProc mode, which stores session state in memory on the Web server. This is the default.
Understanding ViewData, ViewBag And TempData
http://www.binaryintellect.net/articles/36941654-8bd4-4535-9226-ddf47841892f.aspx

8 Comments on “You need to store state and configure the application

    1. Nicolas says:

      Hi,

      I have a question, shouldn’t be the second item “SqlServer”? Because you have a webfarm, so then if you want to use InProc you need to use Sticky Sessions.

      Thanks!
      Regards,
      Nicolas




      4



      0
  1. PK says:

    Since there is redirection involved from Order accepting page to order display page, the order information should be stored in “TempData” which is available to the next subsequent request, and for the duration of a single request.

    So the answer should be Store it in TempData and set mode to Sql server




    25



    0
  2. Mkool says:

    Correct Answer is:
    – TempData : data should only be available to one other screen, TempData is destroyed after being read.
    – Sql Server: hosting in a web farm, In Proc is not recommended when working with WebFarms.




    6



    0

Leave a Reply