Share via

WCF with BasicHttpBinding

Anonymous
2009-04-28T07:35:15+00:00

hi ,

i want to use BasichttpBinding instead of WsHttpBinding as i need to enable transferMode="Streamed". so i changed WsHttpBinding and placed BasichttpBinding instead and enbaled mtom too. now i am facing one new problem. when i am creating the proxy then client config file contains transferMode="Buffered" instead of transferMode="Streamed" . even when i maually change Buffered to Streamed and try to invoke the service i am gettign error

System.ServiceModel.CommunicationException: An error occurred while receiving the HTTP response to http://localhost:1508/Host/FileTransferService.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.

can u tel me where i am going wrong.

my service config binding looks like this

<basicHttpBinding>

          <binding   name="BasicHttpBinding_IFileTransferService"

          closeTimeout="00:01:00"

          openTimeout="00:01:00" receiveTimeout="00:10:00"

          sendTimeout="00:01:00"

          allowCookies="false" bypassProxyOnLocal="false"

          hostNameComparisonMode="StrongWildcard"

          maxBufferSize="65536" maxBufferPoolSize="524288"

          maxReceivedMessageSize="65536"

          messageEncoding="Mtom" textEncoding="utf-8"

          transferMode="Streamed"

          useDefaultWebProxy="true">

            <readerQuotas maxDepth="32"

            maxStringContentLength="8192" maxArrayLength="16384"

            maxBytesPerRead="4096"

            maxNameTableCharCount="16384" />

            <security mode="None">

              <transport clientCredentialType="None"/>

            </security>

          </binding>

        </basicHttpBinding>

my service config file looks like this;

<bindings>

           <basicHttpBinding>

          <binding   name="BasicHttpBinding_IFileTransferService"

          messageEncoding="Mtom" transferMode="Streamed" >

          </binding>

        </basicHttpBinding>     

    </bindings>

        <services>

            <service name="FileTransferService.FileTransferService"  behaviorConfiguration="FileTransferService.FileTransferServiceBehavior">

                <!-- Service Endpoints -->

                <endpoint address="" binding="basicHttpBinding"  contract="FileTransferService.IFileTransferService" bindingConfiguration="BasicHttpBinding_IFileTransferService" bindingName="BasicHttpBinding_IFileTransferService">

          <identity>

            <dns value="localhost" />

          </identity>

        </endpoint>

                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

            </service>

        </services>

        <behaviors>

            <serviceBehaviors>

                <behavior name="FileTransferService.FileTransferServiceBehavior">

                    <serviceMetadata httpGetEnabled="true"/>                  

                    <serviceDebug includeExceptionDetailInFaults="false"/>

                </behavior>

            </serviceBehaviors>

        </behaviors>

now when i invoke service by setting transfermode="Buffered" at client ,but at server its set to "Streamed", its working fine.

but i want to invoke service enabling streaming.

plz help me out...... it is eating up my time

regards,

John

Windows for home | Other | Security and privacy

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2009-04-29T05:51:00+00:00

Hello jkonukudy,

Thank you for visiting the Microsoft Windows Vista Community site.

Sorry to hear about the trouble you are having; however, another user had a similar problem and seemed to resolve it with information within this link.  I suggest we try the steps in the link below:

BasicHttpBinding vs. WSHttpBinding

Let us know if these steps resolve your problem.  I hope the information is useful.

Regards,


Anthony

Microsoft Answers Support Engineer

Visit our Microsoft Answers Feedback Forum and let us know what you think.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful