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:

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:

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



Leave a Reply 8

Your email address will not be published. Required fields are marked *


Manu

Manu

Wrong order:

The first empty field is “ViewData” and the last “InProc”. Have a look at: https://msdn.microsoft.com/en-us/library/ms178586.aspx

Nicolas

Nicolas

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

Sivert

Sivert

viewData and SqlServer is correct. It’s not recommended to use Inproc with WebFarms.

PK

PK

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

R

R

PK you are right, this is the correct answer.

R

R

Answer: TempData and SQLServer respectively.

Mkool

Mkool

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.