Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF Configuration Issues on Shared Hosting
    primarykey
    data
    text
    <p>I have a WCF Service that works fine locally, on a server and on Azure. However i am trying to deploy the same code to RackSpace Sites (Shared Hosting Environment is running .NET 4.0. IIS7 &amp; Windows Server 2008) and am running in the following error when the service returns a response:</p> <blockquote> <p>Message:[System.ServiceModel.ProtocolException] = {"The content type text/html 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. The first 1024 bytes of the res...</p> <p>InnerException:_innerException = {"The remote server returned an error: (500) Internal Server Error."}</p> </blockquote> <p>The thing is, although the response is an error, the method does successfully receive the data and pass it into the data base, So the issue seems to be in the response back from the WCF Method to the client application. Has anyone run into this before? I know that the trust levels on shared hosting might be to blame - but nothing I have tried has seemed to alleviate the errors I'm getting. </p> <p>Here is my configuration on the web application consuming the WCF Service:</p> <p>The Binding:</p> <pre><code>&lt;binding name="BasicHttpBinding_IAccountService" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"&gt; &lt;readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;security mode="None"&gt; &lt;transport clientCredentialType="None" proxyCredentialType="None" realm="" /&gt; &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt; &lt;/security&gt; &lt;/binding&gt; </code></pre> <p>And the endpoint:</p> <pre><code>&lt;client&gt; &lt;endpoint address="http://sitename.com/Services/AccountService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IAccountService" contract="AccountService.IAccountService" name="BasicHttpBinding_IAccountService" /&gt;&lt;/client&gt; </code></pre> <p>This is the default binding/endpoint generated when using "Add Service Reference"</p> <p>The app hosting the WCF Service does not use any custom configurations, but here is the behaviours portion of it's Web.Config:</p> <pre><code>&lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name=""&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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