"Allen Anderson" <allen@sparkysystems.com> wrote in message
news:kmpsh1pufi28dqnqlb2717andkiroksod4@4ax.com...
> I think maybe I didn't explain that as well as I should have. If your
> exception contains any information about the class that threw it, then
> whatever catches it (ie if it's caught on the client side) will have
> to have that information available.
>
> therefore, catch the exception in the remoted class itself that is on
> the server side and rethrow a generic exception that is serializable
> and contains no extra data inside it. When you get that to work, add
> the oither data you need to send over till something breaks.
>
> If you need I can write a small example program that demonstrates
> this.
>
> -Allen
>
http://www.glacialcomponents.com >
http://allenanderson.blogspot.com >
>
> On Sat, 3 Sep 2005 22:05:03 +0530, "Shibu" <shibusv@yahoo.com> wrote:
>
> >Hi Allen,
> >
> >Custom exception classes are defined in the share.dll (shared assembly)
> >I per your previous suggestion, I tried to throw exception from the
> >share.dll . I see another thing that the exceptions which are not caught
> >inside a try{} catch{} block is reaching chient as expected. But once it
is
> >caught in the try{} catch{} block of
> >Remoting Server-2, and thrown from there with innerexception, exception
is
> >not reaching client.
> >
> >Any suggestions?? I am realy confused now that, whether custom exception
is
> >possible in my remoting app.
> >Shibu
> >
> >
> >"Allen Anderson" <allen@sparkysystems.com> wrote in message
> >news:m4obh1hgr7vsv3jgmndt4vmo5k03bq4p7f@4ax.com...
> >> are the exceptions that are being thrown from the other classes defined
in
> >the share.dll?
> >>
> >> If so then the problem may be related to the class definition that the
> >exception is trying to send down on it's from member. To get around this
> >you might try catch at the shared class level then rethrow the exception
> >from that class. Otherwise your
> >> going to have to make that class definition available to the client
side
> >to some degree.
> >>
> >> -Allen
> >>
http://www.glacialcomponents.com > >>
http://allenanderson.blogspot.com > >>
> >> On Tue, 30 Aug 2005 22:42:49 +0530, "Shibu" <shibusv@yahoo.com> wrote:
> >>
> >> >Hi,
> >> >
> >> >I have One Client (Machine 1), Remoting Server-1 (Machine 2), Remoting
> >> >Server-2 (Machine 3)
> >> >
> >> >Client calls Remoting Server-1 and Remote Server-1 calls Remoting
> >Server-2.
> >> >
> >> >Requirement is that, when a custom exception is thrown from the
Remoting
> >> >Server-2, it should reach Client application at
> >> >Machine 1.
> >> >
> >> >Custom exception classes are defined in a common shared dll which is
> >present
> >> >at Client and Both the Remoting Servers.
> >> >At server configuration file, custom errors is set to off
> >> >Custom exception class is as shown below.
> >> >
> >> >using System;
> >> >using System.Runtime.Serialization;
> >> >namespace TMSC.CIS.MyException
> >> >{
> >> > [Serializable]
> >> > public class MyCustomException : : ApplicationException
> >> > {
> >> > public MyCustomException()
> >> > {
> >> > }
> >> > public MyCustomException(string message): base(message)
> >> > {
> >> > }
> >> > public MyCustomException(string message, Exception inner):
> >> >base(message, inner)
> >> > {
> >> > }
> >> > public MyCustomException(SerializationInfo info,
StreamingContext
> >> >context) : base(info, context)
> >> > {
> >> > }
> >> > }
> >> >}
> >> >
> >> >
> >> >Exception thrown from the Remoting Object Class at Remoting Server-2
> >> >successfully reached the client.
> >> >
> >> >PROBLEM
> >> >But if an exception is thrown from other classes
> >> >at Remote Server-2, it says file not found exception at Remoting
> >Server-1.
> >> >
> >> >When I copied the Remote Server-2 dll to the Remote Server-1 location,
it
> >> >worked fine. (Not the right solution)
> >> >What could be the problem.
> >> >
> >> >Any suggestions appriciated.
> >> >Shibu
> >> >
> >>
> >
>