views:

1331

answers:

1

I am trying to set up a streaming WCF service using basicHttpBinding. The service is hosted in an IIS7 process.

The contract contains a simple Stream GetStream() operation.

When I connect with a simple client using a Service Reference I get the following result from the server.

Content Type multipart/related; type="application/xop+xml";start="http://tempuri.org/0";boundary="uuid:9520d099-4241-43f3-824d-5a3d197f62ed+id=1";start-info="text/xml" was not supported by service http://localhost:6000/StreamingTest.svc. The client and service bindings may be mismatched.

This is the binding configuration on the client. The binding section called "streaming_IStreamingTestService" is an exact copy on the server. Ctrl+X.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="streaming_IStreamingTestService" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="655360" maxBufferPoolSize="655360" maxReceivedMessageSize="655360"
                    messageEncoding="Mtom" transferMode="Streamed" useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:8000/StreamingTest.svc"
                binding="basicHttpBinding" bindingConfiguration="streaming_IStreamingTestService"
                contract="Services.StreamingTest.IStreamingTestService" name="streaming_IStreamingTestService" />
        </client>
    </system.serviceModel>
</configuration>
A: 

The part of the error that is relevant is "The client and service bindings may be mismatched".

Since you are using transfermode "Streamed" on the server and "Buffered" is the default, this is probably the mismatch.

Shiraz Bhaiji