DRAG DROP
You are developing an ASP.NET MVC Web API application. The application must meet the
following requirements:
• It must send or receive data without the use of a buffer.
• It must allow up to 1 MB of data to be received.
• It must allow up to 2 MB of data to be sent.
You need to complete the code to meet the requirements. What should you do? (To answer,
drag the appropriate code segments to the correct location or locations in the answer area.
Each code segment 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.)
Explanation:
There is no TrensferMode.Server,
the correct answer is TransferMode.Stream
and also config is the object to change attributes.
This is the right answer.
config.MaxBufferSize
config.MaxReceivedMessageSize
config.TransferMode = TranfserMode.Streamed;
Freedrinks is right.
So when do I get my free drinks?
config.MaxBufferSize
config.MaxReceivedMessageSize
config.TransferMode = TranfserMode.Streamed;
Please, may someone explain why we’re using “config.MaxBufferSize” instead of “config.MaxConcurrentRequest”? Doesn’t that violate the very first requirement: “It must send or receive data without the use of a buffer”
Somebody f’ed this answer all the way up.
Why use MaxBufferSize? Doesn’t that violate the first requirement?
https://msdn.microsoft.com/en-us/library/ms731913(v=vs.110).aspx