Note that there are some explanatory texts on larger screens.

plurals
  1. POAzure Service Bus Relay - 502 Bad Gateway after Service Restart
    primarykey
    data
    text
    <p>We are using the <a href="https://www.windowsazure.com/en-us/develop/net/how-to-guides/service-bus-relay/" rel="nofollow noreferrer"><strong>Azure Service Bus Relay</strong></a> for connecting our on-premise WCF services to our Azure-hosted Web Role. When we upgrade our on-premise WCF services, we always get a <strong>502 Bad Gateway</strong> response from our first few requests through the Azure Service Bus, after the service bus host has re-established itself with the relay (<em>we don't get the "No service is hosted at the specified address."</em> since the service is hosted properly).</p> <p>After a given timeout period - it seems the error disappears and WCF requests are handled properly through the relay. We are using <a href="http://msdn.microsoft.com/en-us/library/microsoft.servicebus.basichttprelaybinding.aspx" rel="nofollow noreferrer"><code>basicHttpRelayBinding</code></a> with <a href="https://stackoverflow.com/a/9386502/175679">HTTP Keep-Alives disabled</a> (<em>to prevent <code>CommunicationExceptions</code></em>).</p> <p>Here is the error message we capture during the WCF requests to the relay from the web role:</p> <blockquote> <p><strong>System.ServiceModel.ProtocolException</strong>: The content type application/soap+xml; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. T he first 550 bytes of the response were...</p> </blockquote> <pre class="lang-xml prettyprint-override"><code>&lt;s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"&gt; &lt;s:Header&gt; &lt;a:Action s:mustUnderstand="1"&gt;http://schemas.microsoft.com/netservices/2009/05/servicebus/relay/FaultAction&lt;/a:Action&gt; &lt;/s:Header&gt; &lt;s:Body&gt; &lt;s:Fault&gt; &lt;s:Code&gt; &lt;s:Value&gt;s:Receiver&lt;/s:Value&gt; &lt;s:Subcode&gt; &lt;s:Value&gt;s:Receiver&lt;/s:Value&gt; &lt;/s:Subcode&gt; &lt;/s:Code&gt; &lt;s:Reason&gt; &lt;s:Text xml:lang="en-US"&gt;50200: Bad Gateway.TrackingId:8bd21714-ae0f-41b5-b810-851b59a345fb_28,TimeStamp:5/29/2012 8:27:14 PM&lt;/s:Text&gt; &lt;/s:Reason&gt; &lt;/s:Fault&gt; &lt;/s:Body&gt; &lt;/s:Envelope&gt; </code></pre> <p>We are currently <a href="http://kennyw.com/work/indigo/54" rel="nofollow noreferrer">trying disabling the default web proxy in the WCF Bindings</a> (<em>via <code>useDefaultWebProxy=false</code></em>), but are wondering if others have seen this same HTTP 502 behavior with the Azure Service Bus and how to fix it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload