Question 60


1.2.1 Question

Multiple Choices

You are developing an application. One requirement is that part of your data access layer needs to be available to a third party, that wants to get this information from a REST URL in XML.

Your company does not have experience with web services, but you have several websites running ASP.NET MVC 4. How could you design and provide these new services? (Choose all that apply.)

  • A. Task an individual on staff to learn WCF, and have this individual develop and deploy these new services using WCF.
  • B. Use the Web API to create REST services using ApiController in which the serialization type is defined by the Accepts property of the browser.
  • C. Build a basic ASP.NET MVC 4 project in which the view simply passes through the information provided by the controller, and the controller manages the code for serializing the response.
  • D. Create an ASP.NET ASMX services file to get, serialize, and return the data.

Answer:

BC
Explanation
A. Incorrect: Although you would eventually be able to get a WCF REST services, it would not be efficient.
B. Correct: Using the Web API is a straightforward way to present REST services.
C. Correct: Using ASP.NET MVC is another way to create a controller that will return XML.
D. Incorrect: An ASMX web service is SOAP-based, not REST-based.