Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > <<Urgent>> HttpModule, WebService

Reply
Thread Tools

<<Urgent>> HttpModule, WebService

 
 
NET_NET_2003
Guest
Posts: n/a
 
      08-25-2003
Hi,
I have a DLL that does something with the network interface. When My
Web Service receives a request, a function of this DLL will be called,
and after the data has been sent to the client, another function will
be called. So it is important to know, when the data has been already
sent.
For the first situation it is not a problem bec a request will be
received, but the problem is in the second case
So I thought, an HttpModule may help, and here is some code:

---------------
Global.asax
---------------
<%@ Application Codebehind="Global.asax.cs" Inherits="ModuleWS.Global"
%>

-------------------
Global.asax.cs
-------------------
protected void Application_EndRequest(Object sender, EventArgs e)
{
HttpApplication httpApp = (HttpApplication) sender;
httpApp.Response.Flush();
//while(httpApp.Response.IsClientConnected)
//the client is always connected until it gets all traffic,
// that is logical, so this will not return
while(httpApp.Response.OutputStream.Length > 0)
{
//System.Threading.Thread.Sleep(20);
}
}
-------------------------------------------------------------------------------

when I include this, the client will break down, bec. it doesn't
receive any answer. Any ideas??? even when u have another solution, I
need a way that tells me that the WebService has sent the data to the
client.
Thanx
 
Reply With Quote
 
 
 
 
Frank Drebin
Guest
Posts: n/a
 
      08-25-2003
It seems you still want to keep things very transactional - even at this
higher (application level).

You could make the client so that it sends a response back to the server
when it has acknowledged what you sent.. so:

Caller->Server: "Gimme data"
Server: AddFilter
Server->Caller: Return "data"
Caller->Server: Ack Data - thanks!
Server. RemoveFilter

What about that?


"NET_NET_2003" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> first, thanx for ur participation
>
> I have a DLL, with which I can create filters in my network card to
> perform some tasks on the packets leaving.
> When a request arrives to my Web Service,the Web Service(or Module, or
> somebody else) calls the "Create_filter" function of this DLL, and
> after the request has been sent, Web Service (or Module, or somebody
> else) must remove this filter calling "Remove_filter" function of the
> DLL.
>
> Creating is no problem (event BeginRequest), but I can't remove the
> filter when the event EndRequest is fired because the stream is still
> in the above layer, i.e. data has not been (maybe not compeletly)
> sent. I need to know, that data is out.
>
> Thanx
>
>
> "Frank Drebin" <(E-Mail Removed)> wrote in message

news:<h1p2b.33064$(E-Mail Removed) igy.com>...
> > I'm not clear on what you said, let me see if I can recap:
> >
> > -a client attaches to your webservice
> > -the web service returns data
> > -you need to do something useful when the web service finishes returning

the
> > data?
> >
> > If so - in the WebMethod, why not put your code in there?
> >
> > "NET_NET_2003" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed) ...



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem to call a WEBSERVICE in another WEBSERVICE (AXIS/ TOMCAT) Cyril Java 2 06-01-2006 06:07 PM
Problem! webservice.htc calling nonsecure webservice from a secured ssl https webpage batista ASP .Net 1 01-26-2006 12:05 PM
Problem! webservice.htc calling nonsecure webservice from a secured ssl https webpage batista ASP .Net 0 01-26-2006 08:13 AM
WebService on Java server versus WebService on .NET Mr. x Java 2 10-09-2003 11:21 PM
use another webservice in a webservice Mr. x ASP .Net Web Services 0 09-26-2003 10:59 PM



Advertisments