070-487 無料問題集「Microsoft Developing Microsoft Azure and Web Services」
You are developing a Windows Communication Foundation (WCF) service named WCF1.
WCF1 will use a certificate to secure the communication channel.
You need to ensure that the WCF service uses a certificate to secure the communication channel.
How should you complete the code? To answer, drag the appropriate code blocks to the correct locations. Each
code block 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.

WCF1 will use a certificate to secure the communication channel.
You need to ensure that the WCF service uses a certificate to secure the communication channel.
How should you complete the code? To answer, drag the appropriate code blocks to the correct locations. Each
code block 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.

正解:

Explanation

Target 1: ClientCredentialType
Target 2: MessageCredentialType.Certificate
Set the ClientCredential property to an appropriate value. The following code sets the property to Certificate.
WSHttpBinding b = new WSHttpBinding();
b.Security.Mode = SecurityMode.Message;
b.Security.Message.ClientCredentialType = MessageCredentialType.Certificate;
Target 3: SetCertificate
On the client class, set the ClientCredentials property of the ClientBase<TChannel> class to an appropriate
value.
Example: // Set the certificate for the client.
cc.ClientCredentials.ClientCertificate.SetCertificate(
StoreLocation.LocalMachine,
StoreName.My,
X509FindType.FindBySubjectName,
"cohowinery.com");
References: https://docs.microsoft.com/en-us/dotnet/framework/wcf/how-to-set-the-security-mode
https://docs.microsoft.com/en-us/dotnet/framework/wcf/how-to-specify-client-credential-values
You are developing a Microsoft ASP.NET Web API.
You need to create a method to answer to the following raw HTML request.

How should you complete 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.
NOTE: Each correct selection is worth one point.

You need to create a method to answer to the following raw HTML request.

How should you complete 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.
NOTE: Each correct selection is worth one point.

正解:

Explanation

References:
https://docs.microsoft.com/en-us/aspnet/web-api/overview/getting-started-with-aspnet-web-api/action-results
https://docs.microsoft.com/en-us/aspnet/web-api/overview/formats-and-model-binding/parameter-binding-in-asp
https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-2.2&tabs=visual-studio#ad
The UploadOrder() method in the UploadCallbackService service is not implementing the callback behavior
defined in the IUploadCallBackService interface.
You need to modify the class to implement the required callback behavior.
What should you do? (To answer, drag the appropriate code segments to the correct location or locations in the
answer area. Each code segments 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.)

defined in the IUploadCallBackService interface.
You need to modify the class to implement the required callback behavior.
What should you do? (To answer, drag the appropriate code segments to the correct location or locations in the
answer area. Each code segments 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.)

正解:

Explanation

You develop an application. You are using the ServiceModel Metadata Utility Tool (svcutil.exe) to generate
service bindings.
The service bindings must use stringent security and require full control over the Windows Communication
Foundation (WCF) messaging stack.
You need to configure the service bindings.
Which values should you use? To answer, configure the appropriate options in the dialog box in the answer
area.
NOTE: Each correct selection is worth one point.

service bindings.
The service bindings must use stringent security and require full control over the Windows Communication
Foundation (WCF) messaging stack.
You need to configure the service bindings.
Which values should you use? To answer, configure the appropriate options in the dialog box in the answer
area.
NOTE: Each correct selection is worth one point.

正解:

Explanation

Box 1: WSHttpBinding
A secure and interoperable binding that is suitable for non-duplex service contracts.
Incorrect: Always select a binding that includes security. By default, all bindings except the
<basicHttpBinding> element have security enabled.
Box 2: Sign
Sign. The protected part is digitally signed. This ensures detection of any tampering with the protected
message part.
Box 3: <wsHttpBing>
References:
https://docs.microsoft.com/en-us/dotnet/framework/wcf/system-provided-bindings
https://docs.microsoft.com/en-us/dotnet/framework/wcf/understanding-protection-level
The GetExternalOrders() method must use members of the EntityClient namespace to query the database for
all records in the InboundQueue entity.
You need to modify the GetExternalOrders() method to return the correct data.
What should you do? (To answer, drag the appropriate code segments to the correct location or locations in the
answer area. 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.)

all records in the InboundQueue entity.
You need to modify the GetExternalOrders() method to return the correct data.
What should you do? (To answer, drag the appropriate code segments to the correct location or locations in the
answer area. 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.)

正解:

Explanation

You updating an existing multitenant ASP.NET MVC application for medical clinics. The application
aggressively uses output caching to improve performance by caching content for 36 hours. The application
uses a query string parameter named "clinicID" that contains the clinic that the user is currently viewing.
Users report that they are occasionally seeing data for the wrong clinic. Users also report that the application
seems to take a long time to return data for a specific clinic even if they have viewed it recently.
You need to configure web.config to resolve the reported problems.
You have the following markup:

Which markup segments should you include in Target 1, Target 2 and Target 3 to complete the markup? (To
answer, select the correct markup segment from each drop-down list in the answer area.)

aggressively uses output caching to improve performance by caching content for 36 hours. The application
uses a query string parameter named "clinicID" that contains the clinic that the user is currently viewing.
Users report that they are occasionally seeing data for the wrong clinic. Users also report that the application
seems to take a long time to return data for a specific clinic even if they have viewed it recently.
You need to configure web.config to resolve the reported problems.
You have the following markup:

Which markup segments should you include in Target 1, Target 2 and Target 3 to complete the markup? (To
answer, select the correct markup segment from each drop-down list in the answer area.)

正解:

Explanation

Target 1: noStore="false"
The page that has the OutputCacheProfile.NoStore property set to true issues a response specifying in its
header to prevent secondary storage of sensitive information.
Target 2: VaryByParam ="clinicID"
The VaryByParam is a semicolon-delimited set of parameters used to vary the cached output. It allows varying
the cached output by GET query string or form POST parameters. For instance, you can vary the user-control
output to the cache by specifying the user-control name along with either a query string or a form POST
parameter.
Incorrect: Not varyByControl="ClinicID"
The VaryByControl is a semicolon-delimited set of IDs of controls to be cached.
Target 3: duration=129600"
The Duration represents the time in seconds that the page or user control is cached. Setting this property
establishes an expiration policy for HTTP responses from the page or control to which it applies and will
automatically cause the caching of their output.
129600 seconds is 36 hours (60*60*36).
References:
https://msdn.microsoft.com/en-us/library/system.web.configuration.outputcacheprofile(v=vs.110).aspx
You are developing an ASP.NET MVC Web API image management application.
The application must meet the following requirements:
* It must send or receive image data without the use of a buffer.
* It must allow up to 4 MB of image data to be received.
* It must allow up to 3 MB of image data to be sent.
You need to complete the code to meet the requirements.
What should you do? (To answer, drag the appropriate code segments to the correct location or locations in the
answer area. 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.)

The application must meet the following requirements:
* It must send or receive image data without the use of a buffer.
* It must allow up to 4 MB of image data to be received.
* It must allow up to 3 MB of image data to be sent.
You need to complete the code to meet the requirements.
What should you do? (To answer, drag the appropriate code segments to the correct location or locations in the
answer area. 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.)

正解:

Explanation

Historical flight information data will be stored in Windows Azure Table Storage using the FlightInfo class as
the table entity.
There are millions of entries in the table. Queries for historical flight information specify a set of airlines to
search and whether the query should return only late flights. Results should be ordered by flight name.
You need to specify which properties of the FlightInfo class should be used at the partition and row keys to
ensure that query results are returned as quickly as possible.
What should you do? (To answer, drag the appropriate properties to the correct location or locations in the
answer area. Each property 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.)

the table entity.
There are millions of entries in the table. Queries for historical flight information specify a set of airlines to
search and whether the query should return only late flights. Results should be ordered by flight name.
You need to specify which properties of the FlightInfo class should be used at the partition and row keys to
ensure that query results are returned as quickly as possible.
What should you do? (To answer, drag the appropriate properties to the correct location or locations in the
answer area. Each property 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.)

正解:

Explanation
Airline
Flight