Error occurs in Provisioning job calling ApplyBrandingService.svc web service with HTTP 413 Request Entity Too Large error

Solution

Workplace Builder

Product

Branding Manager

Product Version

(PH) All versions

Issue

An error occurs in a provisioning job when calling the post-provisioning endpoint 'https://yourwebapplication/BrandingManager/WebServices/ApplyBrandingService.svc/ApplyBrandingToSite' and branding is not applied to the provisioned site.  The exception logged in the provisioning log is:

Exception
TYPE: System.Net.Http.HttpRequestException
MESSAGE: Response status code does not indicate success: 413 (Request Entity Too Large).
STACK: at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at Gimmal.Provisioning.ProvisioningJobHelper.CallService(String serviceUrl, ProvisioningInfo info)
at Gimmal.Provisioning.ProvisioningJobHelper.RunPostProvisioningExtensions(ProvisioningSettings settings, ProvisioningRequest request, Boolean isUpdate)

Root Cause

The size of the messages that can be received on the wire by services using the WSHttpBindingBase is bounded by the amount of memory allocated for each message.  The bound on message size is intended to limit exposure to denial of service (DoS) attacks.

Resolution

This issue is resolved by increasing the webHttpBinding SSL property of the Branding Manager web service web.config file.
<binding name="webHttpBindingSSL" maxReceivedMessageSize="1048576">

The value 1048576 bytes is equal to 1MB - this value can be increased depending on the message size characteristics. 

Please reference the following MSDN article on the maxReceivedMessageSize property.
https://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding.maxreceivedmessagesize(v=vs.100).aspx

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk