exam questions

Exam 70-487 All Questions

View all questions & answers for the 70-487 exam

Exam 70-487 topic 1 question 77 discussion

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

DRAG DROP -
You are developing a web application that uses an assembly named MyAssembly.
You need to ensure that when MyAssembly version 1.0.0.0 is requested, version 2.0.0.0 is used.
How should you complete the markup in the Web.config file? To answer, drag the appropriate elements to the correct locations. Each element 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.
Each correct selection is worth one point.
NOTE:
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: assemblyBinding -

Box 2: bindingRedirect -
To redirect one assembly version to another, use the <bindingRedirect> element.

Box 3: OldVersion -

Box 4: NewVersion -
The newVersion attribute should specify a single version. For example, <bindingRedirect oldVersion="1.1.0.0-1.2.0.0" newVersion="2.0.0.0"/> specifies that the runtime should use version 2.0.0.0 instead of the assembly versions between 1.1.0.0 and 1.2.0.0.

Box 5: assemblyBinding -
The following code example demonstrates a variety of binding redirect scenarios. The example specifies a redirect for a range of versions for myAssembly, and a single binding redirect for mySecondAssembly.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="mySecondAssembly"
publicKeyToken="32ab4ba45e0a69a1"
culture="en-us" />
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
References:
https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/redirect-assembly-versions

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
Currently there are no comments in this discussion, be the first to comment!
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 ...