exam questions

Exam 70-487 All Questions

View all questions & answers for the 70-487 exam

Exam 70-487 topic 4 question 3 discussion

Actual exam question from Microsoft's 70-487
Question #: 3
Topic #: 4
[All 70-487 Questions]

DRAG DROP -
You need to configure the server to self-host the bookstore's Web API application.
You have the following code:

Which code segments should you include in Target 1 and Target 2 to complete the code? (To answer, drag the appropriate code segments to the correct location in the answer area. Each 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:
Use server.OpenAsync().Wait() to put the server into a zen state of acceptance of all connections on the address we specified earlier.
References:
http://notebookheavy.com/2012/03/13/integration-test-asp-net-web-api-with-structuremap/

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
this_is_sparta
Highly Voted 5 years, 4 months ago
The given URLs have no "api/" in it, so routeTemplate must be "{controller}s/{id}".
upvoted 15 times
tiger25
5 years, 3 months ago
there is an error on requirements here. on exam was URI: api/books
upvoted 17 times
...
...
northgaterebel
Most Recent 4 years, 5 months ago
According to this link it is routeTemplate : "api/{controller}/{id}" https://theshravan.net/blog/self-hosting-asp-net-web-api/
upvoted 1 times
...
ammariii
4 years, 7 months ago
But, What about APIControler base class for BookApi controller?!! , I think the map route should be begin with "api/{controller}/{id} by default.
upvoted 1 times
...
Dev666
4 years, 9 months ago
says BookApiController class so api/bookapi/id doesn't make sense
upvoted 3 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 ...