[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Error Handling in remote objects

MEGA

8/21/2004 10:48:00 PM

Hi all,
I have a question about error trapping with remote objects.

Say I have 1 client and 5 servers, the client sends a call call to all 5
servers to copy a file (a dll or assembly) from one location and store this
file in a specific location on the each server hard drive ( the location
will be same for each server) this would be the CopyFile() method

Next I want to call the registerFile() method. What if the copying of the
file errors out on 1 to 5 of the servers or while registering the file there
is a error on 1 to 5 of the servers.

How can I handle this error gracefully so that the entire process does not
crap out. For example I want the other process to continue on the other
servers or I may want the copying and registration of another file on the
server that errored out however be able to send back to the client that
server 1 or ... 5 errored out during file copy and or registration.

sure it's not as simple as using a 'try catch' and using the
Environment.machinename() to specify which server the error occurred on, is
it?

Thanks all.


1 Answer

Bob Grommes

8/23/2004 4:32:00 AM

0

It's almost that simple. You have to use an exception class that can cross
remoting boundaries. Here's a great link to get you started:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp08...

--Bob

"C Antonio" <dainea@hotmail.com> wrote in message
news:umtoiD9hEHA.592@TK2MSFTNGP11.phx.gbl...
> Hi all,
> I have a question about error trapping with remote objects.
>
> Say I have 1 client and 5 servers, the client sends a call call to all 5
> servers to copy a file (a dll or assembly) from one location and store
this
> file in a specific location on the each server hard drive ( the location
> will be same for each server) this would be the CopyFile() method
>
> Next I want to call the registerFile() method. What if the copying of the
> file errors out on 1 to 5 of the servers or while registering the file
there
> is a error on 1 to 5 of the servers.
>
> How can I handle this error gracefully so that the entire process does not
> crap out. For example I want the other process to continue on the other
> servers or I may want the copying and registration of another file on the
> server that errored out however be able to send back to the client that
> server 1 or ... 5 errored out during file copy and or registration.
>
> sure it's not as simple as using a 'try catch' and using the
> Environment.machinename() to specify which server the error occurred on,
is
> it?
>
> Thanks all.