473,396 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SoapExtension and NetworkStream

My Environment
* Windows XP
* .NET 2.0
* Visual Studio 2005

I have written a SoapExtension in c# on a windows XP machine. The purpose
of this extension is to monitor progress for data being transfered over the
wire. I have a web service that exposes one method. All this method does is
return a byte array of 5 megs. When I call the service I receive all 5 megs,
but my SoapException is not called until all 5 megs have been transfered over
the wire. I am succesfully getting the extension to launch, but by the time
it calls the ChainStream for the deserialization process, the Stream being
passed in is a MemoryStream and not a NetworkStream. I am loading the
SoapExtension through my app.config file with the lines below.

<system.web>
<webServices>
<soapExtensionTypes>
<add
type="WSProgressTest.SoapProgressExtension, WSProgressTest"
priority="0"
group="High" />
</soapExtensionTypes>
</webServices>
</system.web>

From what I understand, a priority of 0 and a group level of "High" should
make my SoapExtension be the first Extention to be called. I would like to
know if there is a way to read from a NetworkStream so I can monitor the rate
at which I am transfering data over the network.

Any insight is appriciated. Please let me know if there is some additional
info that owuld make this question simpler to understand/answer.

Thanks
Jul 20 '07 #1
3 1996
Hi,
If you want to moniter the progress of data being sent over wire in web
services then i think tcptrace or fiddler tool is more appropriate:
[1]http://www.fiddlertool.com/fiddler/
[2]http://pocketsoap.com/tcptrace/
--
Hope this helps.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.

"CEvans" wrote:
My Environment
* Windows XP
* .NET 2.0
* Visual Studio 2005

I have written a SoapExtension in c# on a windows XP machine. The purpose
of this extension is to monitor progress for data being transfered over the
wire. I have a web service that exposes one method. All this method does is
return a byte array of 5 megs. When I call the service I receive all 5 megs,
but my SoapException is not called until all 5 megs have been transfered over
the wire. I am succesfully getting the extension to launch, but by the time
it calls the ChainStream for the deserialization process, the Stream being
passed in is a MemoryStream and not a NetworkStream. I am loading the
SoapExtension through my app.config file with the lines below.

<system.web>
<webServices>
<soapExtensionTypes>
<add
type="WSProgressTest.SoapProgressExtension, WSProgressTest"
priority="0"
group="High" />
</soapExtensionTypes>
</webServices>
</system.web>

From what I understand, a priority of 0 and a group level of "High" should
make my SoapExtension be the first Extention to be called. I would like to
know if there is a way to read from a NetworkStream so I can monitor the rate
at which I am transfering data over the network.

Any insight is appriciated. Please let me know if there is some additional
info that owuld make this question simpler to understand/answer.

Thanks
Jul 20 '07 #2
Manish,

Thanks for the response. I went to the wesites you provided and these do
seem like good monitoring tools. Unfortunatly, I am not looking for a
monitoring tool. I am looking at a way to show progress to an end user about
the rate data is being transfered over the network. I am also trying to show
percentage of completion of the data being sent across the network. I have
provided a link below which explains exactly what I am trying to do.
Unfortunately, the stream I am able to intercept with the SoapExtension is
too late in the deserialization process because it is already a memory stream
by that point. I am trying to find out how to intercept the stream earlier
in the deserialization process. I am doing all of my processing in the
BeforeDeserialization stage.

http://www.codeproject.com/useritems...n_Progress.asp
Thanks,
Evans

"Manish Bafna" wrote:
Hi,
If you want to moniter the progress of data being sent over wire in web
services then i think tcptrace or fiddler tool is more appropriate:
[1]http://www.fiddlertool.com/fiddler/
[2]http://pocketsoap.com/tcptrace/
--
Hope this helps.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.

"CEvans" wrote:
My Environment
* Windows XP
* .NET 2.0
* Visual Studio 2005

I have written a SoapExtension in c# on a windows XP machine. The purpose
of this extension is to monitor progress for data being transfered over the
wire. I have a web service that exposes one method. All this method does is
return a byte array of 5 megs. When I call the service I receive all 5 megs,
but my SoapException is not called until all 5 megs have been transfered over
the wire. I am succesfully getting the extension to launch, but by the time
it calls the ChainStream for the deserialization process, the Stream being
passed in is a MemoryStream and not a NetworkStream. I am loading the
SoapExtension through my app.config file with the lines below.

<system.web>
<webServices>
<soapExtensionTypes>
<add
type="WSProgressTest.SoapProgressExtension, WSProgressTest"
priority="0"
group="High" />
</soapExtensionTypes>
</webServices>
</system.web>

From what I understand, a priority of 0 and a group level of "High" should
make my SoapExtension be the first Extention to be called. I would like to
know if there is a way to read from a NetworkStream so I can monitor the rate
at which I am transfering data over the network.

Any insight is appriciated. Please let me know if there is some additional
info that owuld make this question simpler to understand/answer.

Thanks
Jul 20 '07 #3
Any additional insight to my comments below would be appriciated!!!

I figure I would provide at least a partial answer at this point. I am now
able to stream the data as it comes off the wire. What did I change?... Not
too much. I was making an asynchronous WS call through the auto generated
proxy file. I changed the call to be a synchronous call and all of a sudden
things started working. It seems that when an asynch call is made, my
soapextension was not called until after the data was completely transmitted
to the client. When I make a synchronous call, I get access to the
System.Net.Connect stream. I will post again after I figure that out why
their are differences in logical flow for the two calls.
Jul 20 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: fred carter | last post by:
I would like to be able to set an arbitrary http header from a SoapExtension when said extension is acting on behalf of a client. I have not seen a means for doing so. For incoming messages or...
1
by: Steven.Dahlin | last post by:
I am trying to execute a soap extension with a WinForm client accessing a Web Service. I have created a application configuration which includes the following: <configuration> <system.web>...
3
by: Trevor Pinkney | last post by:
Hi, Is it possible to reference a custom SoapExtension instance from within a WebMethod? I have a SoapExtension used by several web-services for generic logging. The SoapExtension logs the...
1
by: Dave Buxbaum via .NET 247 | last post by:
Hi, I have a SoapExtension that adds a SoapHeader to all outboundmessages. This works fine, but I don't see a way to control thenamespace of the emitted header. Here is what I'm doing: I have...
2
by: lprisr | last post by:
Hi, I have double byte characters in the content that I am returning using Web Services. However, the encoding in the xml file returned by Web Services is utf-8 and I am unable to read the...
0
by: Cameron | last post by:
Hi All, I've just written a small program to use a locally hosted webservice which works fine. However I've also written a SOAPExtension for the client and I'm having trouble with the...
0
by: Symon | last post by:
I've got a web service project that was built under VS 2003 which has a SoapExtension in the project. The SoapExtension is registered in the <soapExtensionTypes> element of the web.config and has...
0
by: thatsMaBoy | last post by:
Hi, I have a VB.NET 2003 web service client (EXE) that makes use of a SOAPExtension class. The client calls a web service that returns a SOAP message containing MIME encoded files. The...
10
by: Andy Kendall | last post by:
I have a problem accessing my custom SoapHeader from a SoapExtension. My extension has no compile time reference to the class derived from SoapHeader, so how can cast it into a SoapHeader of the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.