exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 137 discussion

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

You are developing an ASP.NET Core MVC web application that provides assets to external websites including images, JavaScript scripts and text files.
The external websites must be able to make full use of assets provided to them by the web application, including JavaScript asynchronous HTTP requests.
Pages that refer to the images and text files do not load. External websites are unable to use assets.
You need to resolve the issues.
What should you do?

  • A. Add a MVC controller and action to load the files from the folder.
  • B. In the startup Configure method, call IApplicationBuilder. Use StaticFiles for the folder that contains the files.
  • C. In the startup ConfigureServices method, call IServiceCollection. Add DirectoryBrowser for the folder that contains the files.
  • D. Mark vendor provided files as content and set the value for Copy to Output Directory to CopyAlways
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
References:
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-2.1&tabs=aspnetcore2x

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
arohh
4 years, 5 months ago
Answer is: IApplicationBuilder
upvoted 1 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago