exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 99 discussion

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

DRAG DROP -
You develop an ASP.NET MVC application. You plan to implement ASP.NET SignalR for real-time push notifications. The application includes the following class:

You need to display the message.
How should you complete the relevant code segment? To answer, drag the appropriate code segment to the correct location or 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:
Box 1: $.hubconnection();
Create a connection.
Box 2: con.createHubProyxy('MyHub');
Declare a proxy to reference the hub.
Box 3: hub.start()('function', function(hello) {

Start the connection -
References:
https://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr

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
Ekovalev
Highly Voted 5 years, 7 months ago
Box 3 is bullsh... Hub invokes on 'hello' function that passes 'message' variable: hub.on('hello', function(message){ $('#message').text(message); } );
upvoted 20 times
majco333
5 years, 4 months ago
It's correct. More info: https://docs.microsoft.com/en-us/aspnet/signalr/overview/guide-to-the-api/hubs-api-guide-javascript-client#how-to-establish-a-connection
upvoted 3 times
Burgyn
5 years, 4 months ago
I'm not sure. Your link show using method start without delegate. See: https://docs.microsoft.com/en-us/aspnet/signalr/overview/guide-to-the-api/hubs-api-guide-javascript-client#the-generated-proxy-and-what-it-does-for-you
upvoted 2 times
...
majco333
5 years, 4 months ago
I aggre with Ekovalev...
upvoted 7 times
...
...
...
zimzimzimma
Highly Voted 5 years ago
The third code segment is nonsense as already said by Ekovalev. So FINAL ANSWER: FINAL ANSWER: $.hubConnection(); con.createHubProxy("MyHub") hub.start('hello', function(message) {
upvoted 8 times
...
luixaca
Most Recent 4 years, 5 months ago
I can confirm they haven't changed the code segments in the exam. I chose hub.on('hello', function(message) because it is the only syntactically correct.
upvoted 4 times
...
hungry_ape9000
5 years, 1 month ago
FINAL ANSWER: $.hubConnection(); con.createHubProxy("MyHub") hub.start('function', function(hello) {
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 ...