Link to home
Start Free TrialLog in
Avatar of zattz
zattz

asked on

.NET Webservice: determine number of bytes of data transferred

Hi,

I am calling a .NET webservice. Is there any way to determine how much data (in bytes) has/is being transferred?

thx
Avatar of Neotk
Neotk
Flag of Brazil image

Try this.
In your web.config file:

<configuration><system.web>

<httpRuntime maxRequestLength="8000">

</configuration</system.web>


Regards, Rodrigo Leote.
Avatar of SimonFerris
SimonFerris

Check out this article http://www.codeproject.com/soap/MTOMWebServices.asp 

To see how much has been transferred.
zattz,
   Do you want to know this information interactively, or do you want to know at the end of the transaction how much data was transfered?  The former may not be possible, but the latter depends on which side of the transaction you are doing.  In essence, you should be able to get to the HTTP Request and Response objects tied to the transaction from the WebService object.  Something like:

ServiceObj.ExecuteYourMethod();
BytesTransferred = ServiceObj.Context.Response.TotalBytes;

    -dZ.
TheLearnedOne,
    As per my response, there is not enough information provided by the inquirer to assess a proper answer.  If, however, we can infer that he wants to know how much data was transmitted to the server on a web server request, then my answer should be accepted.  However, I don't know if this determination is fair.

     -dZ.
Avatar of zattz

ASKER

I apologize for not responding sooner.

I wanted to know the amount of data transferred interactively. I wanted to show the amount of data to transfer at the beginning, and then update the amount transferred interactively as the web service call progresses.

I never did find any solutions to this problem and gave up the idea.

Again, I apologise for not replying, it must have slipped through my inbox
ASKER CERTIFIED SOLUTION
Avatar of DropZone
DropZone
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
And if that one doesn't help, try this one from Microsoft:
http://msdn2.microsoft.com/en-us/library/Aa480520.aspx

    -dZ.
Avatar of zattz

ASKER

looks good.

thanks