none
Need help with WCF binding for moving Audio Blobs RRS feed

  • Question

  • Having troubles with a service that moved audio files from an oracle database to a playback client.  The Audio gets returned to the service from the Oracle database pretty snappy, but the handoff from the service to the client, even when hosted on the same machine is slow to none.  I am not very familiar with bindings and suspect the issue resides there.  Here is the binding I'm using and the size of the audio file is up to 15 meg.

     <binding name="netTCPActivity" closeTimeout="00:05:00"

                     openTimeout="00:05:00" 

                     sendTimeout="00:05:00" 

                     listenBacklog="100" 

                     maxBufferPoolSize="52428800" 

                     maxBufferSize="52428800" 

                     maxConnections="300" 

                     maxReceivedMessageSize="52428800">

              <readerQuotas maxDepth="52428800" 

                            maxStringContentLength="52428800" 

                            maxArrayLength="52428800" 

                            maxBytesPerRead="52428800" 

                            maxNameTableCharCount="52428800"/>

              <security mode="None"/>

    Wednesday, May 8, 2013 3:37 PM

Answers

  • Which type of Binding are you using (wshttpbinding, custombinding, nettcpbinding, or some other)?

    May be you can refer following link

    http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP


    Gaurav Khanna | Microsoft VB.NET MVP | Microsoft Community Contributor

    Wednesday, May 8, 2013 7:08 PM
  • Hi Da Wiz,

    Would you show us more information about your WCF service such as the operation signature (parametr and return type) which is used to transfer audio data? Also, are you using IIS as host or a custom .NET application has host?

    From the binding configuration you provided, there is nothing incorrect. For the slow data transfer, how did you detect it? Does it occurs when you tried using many clients to connect the service concurrently or just using a single client to consume the service?  Since netTcpBinding is using tcp transport, I'd suggest you try building a simple TCP server application via .NET TcpListener class and connect it via TcpClient to transfer audio data to see if the transfer speed differs much from the WCF netTcpbinding hosted scenario. If a raw tcp listener based socket app also suffers the same issue, then the problem is possibly related to the local network environment instead of the WCF layer.

    #TcpListener Class
    http://msdn.microsoft.com/en-us/library/system.net.sockets.tcplistener.aspx


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, May 14, 2013 3:33 AM
    Moderator

All replies

  • Which type of Binding are you using (wshttpbinding, custombinding, nettcpbinding, or some other)?

    May be you can refer following link

    http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP


    Gaurav Khanna | Microsoft VB.NET MVP | Microsoft Community Contributor

    Wednesday, May 8, 2013 7:08 PM
  • Hi Da Wiz,

    Would you show us more information about your WCF service such as the operation signature (parametr and return type) which is used to transfer audio data? Also, are you using IIS as host or a custom .NET application has host?

    From the binding configuration you provided, there is nothing incorrect. For the slow data transfer, how did you detect it? Does it occurs when you tried using many clients to connect the service concurrently or just using a single client to consume the service?  Since netTcpBinding is using tcp transport, I'd suggest you try building a simple TCP server application via .NET TcpListener class and connect it via TcpClient to transfer audio data to see if the transfer speed differs much from the WCF netTcpbinding hosted scenario. If a raw tcp listener based socket app also suffers the same issue, then the problem is possibly related to the local network environment instead of the WCF layer.

    #TcpListener Class
    http://msdn.microsoft.com/en-us/library/system.net.sockets.tcplistener.aspx


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, May 14, 2013 3:33 AM
    Moderator