run function without stoping

  • Thread starter Thread starter Gav
  • Start date Start date
G

Gav

I have very little knowledge of threads (although I think this is what I
need to use).

I have web services and web applications. It's my understanding (correct me
if I'm wrong) that if a web application calls a web service execution of the
application waits for the web service to finish wether it returns a value or
not. Is there a way to stop this?

Thanks
Gav
 
When you import a web-reference, the proxy class that is generated has
syncronous and asyncronous methods for each webmethod in the webservice
(this is something done automatically - the developer of the webservice
doesn't manually have to create the asyncronous methods). Every method can
be called with:

MethodName(whatever arguments)
OR:
BeginMethodName(whatever arguments)

The BeginX method is the asyncronous one. It follows the asyncronous model
used throughout the framework.

-Brian
 
Hello Gav,

Thanks for your post. As suggested by Brian, you can make asynchronous Web
Service calls which offer you the opportunity to cancel calls if needed.
Please refer to the following MSDN article for detailed information:

Asynchronous Web Service Calls over HTTP with the .NET Framework
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/h
tml/service09032002.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Gav,

I wanted to post a quick note to see if you would like additional
assistance or information regarding this particular issue. We appreciate
your patience and look forward to hearing from you!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Yes please, I don't seem to be able to get this working... I don't need to
add a web reference because the webservice is in my project (I want to call
it from another web service in the same project).

However I tried adding it as a web reference anyway, for the sake of trying
to run this method asynchronous, but I still get an error if I try to run it
using:

BeginMethodName

Do you have any sample code?

Thanks again
 
Back
Top