how to refer to same web service installed on multiple webservers

T

Tim Gallivan

I have a webservice installed on 3 servers (for load-reduction purposes). I
call the service asynchronously and the code proceeds like this:

private void BlahBlah
{
NetworxServer1.Networx net1 = new NetworxServer1.Networx();
AsyncCallback cb1 = new AsyncCallback(RRCallback1);
IAsyncResult ar1 = net1.BeginReqRespArray(dsToSend,cb1,net1);
}

public void RRCallback1(IAsyncResult ar)
{
NetworxServer1.Networx net = (NetworxServer1.Networx) ar.AsyncState;
...
...
...
}

For the second and third servers, I have net2 and net3, along with
RRCallback2 and RRCallback3. I'd like to know if there is a way to clean up
this code, maybe to do this with one callback, no matter how many servers
run my webservice? I'm lost.

Any suggestions/samples/directions to tall bridges would be greatly
appreciated.
Thanks,

Tim Gallivan
I know I'm a great teacher because when I give a lesson, the person never
comes back.
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top