Developing ASP.NET MVC Web Applications — Question 113
You deploy an ASP.NET MVC Web application to Internet Information Services (IIS). The application has a secure area that provides access to custom reports.
You must develop custom business logic to support the reports. The custom business logic has the following requirements:
✑ It must run each time that a report is requested.
✑ It must not run for other IIS requests.
✑ It must be mapped to the request extension of the report.
✑ It must be written by using a managed language that is supported by the .NET framework.
You must be able to quickly modify and deploy updates to the business logic.
You need to develop the custom business logic.
What should you do?
Answer options
- A. Update the report logic to include the custom business logic. Use WebDAV to publish the reports to the server.
- B. Develop a new HTTP module that includes the custom business logic. Deploy the HTTP module to IIS.
- C. Develop a new HTTP handler that includes the custom business logic. Deploy the HTTP handler to IIS.
- D. Develop a new ISAPI filter that includes the custom business logic. Deploy the ISAPI filter to IIS.
Correct answer: C
Explanation
The correct answer is C because an HTTP handler is specifically designed to process requests for particular file types or extensions, which aligns with the requirement of mapping to the request extension of the reports. In contrast, an HTTP module (option B) operates at a broader level and would not limit execution to just report requests, while an ISAPI filter (option D) is not a managed code component and isn't as easily deployable for rapid updates. Option A doesn't meet the requirement of isolating the custom logic to report requests.