WebRole with WCF Service got in "Busy" state after adding StandardEndpoint in web.config

I recently worked on
an incident in which the Windows Azure application had 1 web role and one WCF
role. Initially the basics application with no specific changes worked well on
compute emulator and on Windows Azure. After when we added the following configuration
in the web.config the application for stuck “Busy” on Azure:

 

<standardEndpoints>

                 <webHttpEndpoint>

                                  <standardEndpoint name=""
helpEnabled="true" automaticFormatSelectionEnabled="true" />

                 </webHttpEndpoint>

</standardEndpoints>

 

After little more investigation
inside the Windows Azure VM, I found that the reason for this issue is that the cloud VM's machine.config is
missing the following section:

<configSections>

<sectionGroup name="system.serviceModel"
type="System.ServiceModel.Configuration.ServiceModelSectionGroup,
System.ServiceModel, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089">

<section name="standardEndpoints"
type="System.ServiceModel.Configuration.StandardEndpointsSection,
System.ServiceModel, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"/>

</sectionGroup>

</configSections>

After I added
above part in the machine.config, the role started without any further problem.