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

  • Home
  • SEARCH
  • 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 3842704
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:49:55+00:00 2026-05-19T15:49:55+00:00

I’ve implemented a WCF service in streaming mode to transfer larger files over the

  • 0

I’ve implemented a WCF service in streaming mode to transfer larger files over the Internet.

So far, so good.

For statistics purposes, I want to log how long a transfer takes and which size has been transfered. The size is not the matter, but tracking the transfer time is a bit tricky.

For my need, I’ve implemented a DownloadStream class which derives from MemoryStream.
This class has two events: The first is triggered by start reading and the second by finish reading. It works fine.
http://www.danflash.com/files/code/DownloadStream.txt

But if a client (WCF client) calls a WCF method to get the stream, a strange thing happens.
On the client side, I get the reference for the stream and can read from it sequentially. It means, I can take the time before reading from the stream and afterwards and get the duration for the transfer.

But if I try to do that on the server side, the whole stream will be read automatically, before any client starts with reading from it. It seems that the stream content will be copied to the memory.

Is there a way to track the transfer time on server side?

  • 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-19T15:49:56+00:00Added an answer on May 19, 2026 at 3:49 pm

    The payload is typically buffered in memory before transmission starts, in order to allow for the correct content-length headers to be sent, the entire payload to be validated, the payload encrypted (if message encryption is enabled it is applied before the payload is sent; contrast with transport encryption which can be streamed), to apply transformations such as MTOM (which happens after the payload has been constructed), and to enforce quotas.

    You might be able to time this better with a WCF inspector.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

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.