Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4347336
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:17:33+00:00 2026-05-21T12:17:33+00:00

I am trying to write a WCF service that can send mp3 files to

  • 0

I am trying to write a WCF service that can send mp3 files to the client. I need it to transfer the mp3 file using progressive download because the client is an android app and I want it to start playing as soon as possible. How can I do progressive download using WCF? Is it possible?

Here’s what I have so far. This seems to work but its not progressive download. It plays in the android app but only after the whole file has been downloaded.

Service contract:

[OperationContract, WebGet(UriTemplate = "/GetFileStream/?filepath={virtualPath}")]
    Stream GetFileStream(string virtualPath);

Service Configuration:

    <bindings>
        <webHttpBinding>
            <binding name="streamedHttpBinding" transferMode="StreamedResponse"
                     maxReceivedMessageSize="1000000000">
            </binding>
        </webHttpBinding>
    </bindings>
    <service name="...">
            <endpoint address="" behaviorConfiguration="restful" binding="webHttpBinding"
                bindingConfiguration="streamedHttpBinding"
                contract="..." />

     </service>
     <behaviors>
        <endpointBehaviors>
            <behavior name="restful">
                <webHttp />
            </behavior>
        </endpointBehaviors>
        <serviceBehaviors>
            <behavior name="">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
        </serviceBehaviors>
    </behaviors>

If you can provide links to sources about progressive download, that would be helpful as well. My googling has not turned up much for progressive download + wcf. Appreciate your help.

Android code:

player.reset();
player.setAudioStreamType(AudioManager.STREAM_MUSIC);
player.setDataSource(path);
player.prepare();
player.start();

player is a MediaPlayer object. I’m setting the data source to a url in path.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T12:17:34+00:00Added an answer on May 21, 2026 at 12:17 pm

    so I figured out what was wrong. WCF does do progressive download. I thought the behavior configuration section was necessary when you are returning Streams from your service. But for a webhttpbinding, in order to do progressive download, it should not be set. Setting the binding configuration to streamedResponse will enable chunking and that is not progressive download. Correct configuration is below.

    <bindings>
    </bindings>
    <service name="...">
            <endpoint address="" behaviorConfiguration="restful" binding="webHttpBinding"
                contract="..." />
    
     </service>
     <behaviors>
        <endpointBehaviors>
            <behavior name="restful">
                <webHttp />
            </behavior>
        </endpointBehaviors>
    </behaviors>
    

    Note that there is no bindingConfiguration on the endpoint.

    Thanks to @MisterSquonk for your comments. they helped me look in the right places.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write a durable WCF service, whereby clients can handle that the
I'm trying to write a WCF 4.0 service that will receive SOAP alerts from
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Trying to write a PowerShell cmdlet that will mute the sound at start, unless
I'm trying to write a regex function that will identify and replace a single
I'm trying to write a custom WPF ValidationRule to enforce that a certain property
I'm trying to write some PHP to upload a file to a folder on
I'm trying to write a stored procedure to select employees who have birthdays that
I'm trying to write a page that calls PHP that's stored in a MySQL
I have a WCF web service that uses ASP.NET session state. WCF sets a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.