PL-400 · Question #410
PL-400 Question #410: Real Exam Question with Answer & Explanation
The correct answer is D: Set the HTTP connection timeout value explicitly to limit how long each connection can remain. To prevent a plug-in from timing out when making requests to a slow external web service, you should explicitly set the HTTP connection timeout to allow more time for responses.
Question
A company requires a plug-in that makes multiple requests to an external web service. The plug- in must not time out when the web service has issues or is slow to respond. You need to create the plug-in. What should you do?
Options
- AAssign the IOrganizationService object to a member variable.
- BRegister the plug-in to run synchronously.
- CRegister the plug-in step once for each web service request.
- DSet the HTTP connection timeout value explicitly to limit how long each connection can remain
Explanation
To prevent a plug-in from timing out when making requests to a slow external web service, you should explicitly set the HTTP connection timeout to allow more time for responses.
Common mistakes.
- A. Assigning the IOrganizationService object to a member variable is a coding practice for managing the service context, which does not directly influence the timeout duration of external HTTP requests.
- B. Registering the plug-in to run synchronously means it executes within the transaction, making it more vulnerable to timeouts if external calls are slow, as it directly impacts the user experience and transaction completion.
- C. Registering the plug-in step once for each web service request describes the event-driven trigger for the plug-in, not a mechanism to manage timeouts of the external HTTP calls made within the plug-in's code.
Concept tested. Managing HTTP timeouts for external calls in Dataverse plug-ins
Community Discussion
No community discussion yet for this question.