exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 170 discussion

Actual exam question from Microsoft's 70-486
Question #: 170
Topic #: 1
[All 70-486 Questions]

DRAG DROP -
You are developing a .NET Core library that will be used by multiple applications. The library contains ASP.NET Core middleware named
EnsureSecurityMiddleware.
EnsureSecurityMiddleware must always run prior to other middleware.
You need to configure the middleware.
How should you complete the code? To answer, drag the appropriate code segments to the correct locations. 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.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Reference:
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-2.1

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Hacked
Highly Voted 5 years, 9 months ago
This should be IStartupFilter, IApplicationBuilder, IApplicationBuilder. See: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/startup?view=aspnetcore-2.2
upvoted 33 times
founderDev
5 years, 5 months ago
i agree
upvoted 3 times
...
Janibaldo
5 years, 4 months ago
You'r right. Ref. https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.hosting.istartupfilter.configure?view=aspnetcore-3.1#Microsoft_AspNetCore_Hosting_IStartupFilter_Configure_System_Action_Microsoft_AspNetCore_Builder_IApplicationBuilder__
upvoted 2 times
...
...
Mickey
Highly Voted 5 years, 9 months ago
public class RequestSetOptionsStartupFilter : IStartupFilter { public Action<IApplicationBuilder> Configure(Action<IApplicationBuilder> next) { return builder => { builder.UseMiddleware<RequestSetOptionsMiddleware>(); next(builder); }; } }
upvoted 29 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...