how to use asynchronous calls in asmx

S

SenthilVel

Hi

Can any one let me know how i can perform a Asychronous calll in a web
service ?

or using a thread in Asmx a better solution than the async call ?

pls send me any link to example, where i can get this answer..

Thanks
Senthil
 
S

SenthilVel

hi ,
what i want to do is :

1. My client calls my asmx webservice --here i need to send a message back
saying "i have started your request".This is the first return
2. secondly i need to complete the job what my asmx is intended to so and
send the status of the job back to my client.

Thanks
Senthil
 
P

Patrice

I'm still not sure to fully understand what you expect from this scheme.
Keep in mind that under normal circumstances a web service is based on a
request/response pair i.e. each response should be issued in response to a
client request.

Also I'm not sure to understand what benefit you expect from your first
call...

So basically it would give us :

1) you could just display client side that processing has started and then
call the web service once.

2) a variation would be to use an asynchronous call to your service (I
believe Begin<Method> would fail in case if this is what you are after) and
you could additionaly perform client side some other things while the
service is running.

I would choose one of those two schemes.

Extreme solutions would be :

3) to have a pair of calls one submitting a job (possibly returning a job
id) and the other triggering the actual execution.

4) you could even have a client side service that the web service could call
once done.

But I would really double check the reason for this first call before trying
to do so...
 
B

bruce barker \(sqlwork.com\)

the client need to poll for the request to be completed, the server can not
send to the client. so on the first request, you start a thread to process
the request. then the client on a timer, calls to see if its done.

some issues to address

1) how to identity the work in process - use some sort of ticket token
2) how to store the resuslt of the processing
3) what if the client never calls back to check results
4) controlling how many requestes can be processed at the same time.
5) error handling of the background threads.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top