[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.remoting

Exception.StackTrace how can i serialize it to client app

Serg

10/22/2004 7:30:00 AM

I am using Framework_1.1
I have server and client apps.
When on client app I am catching Exception thrown from server app its
StackTrace property is empty.
Is it possible to make System.Exception.StackTrace serializable?
I have wanted to do it manualy but StackTrace is implemented only as GET
property not SET.
Has anybody any ideas?
Thanks in adv
Serg


7 Answers

Ken Kolda

10/22/2004 3:51:00 PM

0

The server's stack trace should come along automatically from the server to
the client. When you say the stack trace is empty, do literally mean you get
the empty string? That seems unlikely since, at a minimum, you should get
the stack trace from the client side (including all the proxy methods and
channel sink methods).

Ken


"Serg" <sergNOSPAM@alef.ru> wrote in message
news:uKohyjAuEHA.2624@TK2MSFTNGP11.phx.gbl...
> I am using Framework_1.1
> I have server and client apps.
> When on client app I am catching Exception thrown from server app its
> StackTrace property is empty.
> Is it possible to make System.Exception.StackTrace serializable?
> I have wanted to do it manualy but StackTrace is implemented only as GET
> property not SET.
> Has anybody any ideas?
> Thanks in adv
> Serg
>
>


Serg

10/25/2004 9:14:00 AM

0

Yes, the string returned by StackTrace on client site is empty .
When i check this on server site it is non empty.

The workaround I have done for my exceptions is serialization StackTrace
myself.
On server site in GetObjectData() I am serializing it.
On client site I am restoring it in my own private string.
I have overrided StackTrace so it returns base.StackTrace or my private
string.
It works well for my own Exception but for system Exception the problem is
not solved.

May be the problem in some security settings? I have found nothing about it
in MSDN.



"Ken Kolda" <ken.kolda@elliemae-nospamplease.com> wrote in message
news:uOzPV8EuEHA.348@tk2msftngp13.phx.gbl...
> The server's stack trace should come along automatically from the server
to
> the client. When you say the stack trace is empty, do literally mean you
get
> the empty string? That seems unlikely since, at a minimum, you should get
> the stack trace from the client side (including all the proxy methods and
> channel sink methods).
>
> Ken
>
>
> "Serg" <sergNOSPAM@alef.ru> wrote in message
> news:uKohyjAuEHA.2624@TK2MSFTNGP11.phx.gbl...
> > I am using Framework_1.1
> > I have server and client apps.
> > When on client app I am catching Exception thrown from server app its
> > StackTrace property is empty.
> > Is it possible to make System.Exception.StackTrace serializable?
> > I have wanted to do it manualy but StackTrace is implemented only as GET
> > property not SET.
> > Has anybody any ideas?
> > Thanks in adv
> > Serg
> >
> >
>
>


Serg

10/25/2004 9:34:00 AM

0

A little correction.
Of course i see the StackTrace of client side. But it does not include
servers StackTrace.
I want to see the StackTrace from server side and for all InnerExceptions.
It is unhelpful to me to see that exception occurs in my clients method that
calls some remote object. After that i should debug my server app to find
where the original exception occurs. It takes a LOT of time.



"Ken Kolda" <ken.kolda@elliemae-nospamplease.com> wrote in message
news:uOzPV8EuEHA.348@tk2msftngp13.phx.gbl...
> The server's stack trace should come along automatically from the server
to
> the client. When you say the stack trace is empty, do literally mean you
get
> the empty string? That seems unlikely since, at a minimum, you should get
> the stack trace from the client side (including all the proxy methods and
> channel sink methods).
>
> Ken
>
>
> "Serg" <sergNOSPAM@alef.ru> wrote in message
> news:uKohyjAuEHA.2624@TK2MSFTNGP11.phx.gbl...
> > I am using Framework_1.1
> > I have server and client apps.
> > When on client app I am catching Exception thrown from server app its
> > StackTrace property is empty.
> > Is it possible to make System.Exception.StackTrace serializable?
> > I have wanted to do it manualy but StackTrace is implemented only as GET
> > property not SET.
> > Has anybody any ideas?
> > Thanks in adv
> > Serg
> >
> >
>
>


Robert Jordan

10/25/2004 9:59:00 AM

0

Hi Serg,

> A little correction.
> Of course i see the StackTrace of client side. But it does not include
> servers StackTrace.
> I want to see the StackTrace from server side and for all InnerExceptions.
> It is unhelpful to me to see that exception occurs in my clients method that
> calls some remote object. After that i should debug my server app to find
> where the original exception occurs. It takes a LOT of time.

You may try this

server.exe.config:

<configuration>
<system.runtime.remoting>
<customErrors mode="off" />
...

bye
Rob

Serg

10/25/2004 12:53:00 PM

0

Hi Robert

I have tried to switch this.
It switches off/on Message property, but it does not have any affect on
StackTrace property :(
According to MSDN it should, but it does not.
I can`t see any concerned switches.
There only remains to think that this is an error in Framework_1.1
Hope it will be fixed.



"Robert Jordan" <robertj@gmx.net> wrote in message
news:cliipp$hjc$00$1@news.t-online.com...
> Hi Serg,
>
> > A little correction.
> > Of course i see the StackTrace of client side. But it does not include
> > servers StackTrace.
> > I want to see the StackTrace from server side and for all
InnerExceptions.
> > It is unhelpful to me to see that exception occurs in my clients method
that
> > calls some remote object. After that i should debug my server app to
find
> > where the original exception occurs. It takes a LOT of time.
>
> You may try this
>
> server.exe.config:
>
> <configuration>
> <system.runtime.remoting>
> <customErrors mode="off" />
> ...
>
> bye
> Rob


Ken Kolda

10/25/2004 3:41:00 PM

0

When you look at the exception that you catch on the client, do you look at
the InnerException property? The client catches the server's exception and
then re-throws its own, with the server exception being set as the inner
exception for the new one. So, to get to the server stack trace, you would
do:

try
{
...
}
catch (Exception ex)
{
Console.WriteLine(ex.InnerException.StrackTrace);
}

Ken


"Serg" <sergNOSPAM@alef.ru> wrote in message
news:eZd1WGpuEHA.3152@TK2MSFTNGP14.phx.gbl...
> Hi Robert
>
> I have tried to switch this.
> It switches off/on Message property, but it does not have any affect on
> StackTrace property :(
> According to MSDN it should, but it does not.
> I can`t see any concerned switches.
> There only remains to think that this is an error in Framework_1.1
> Hope it will be fixed.
>
>
>
> "Robert Jordan" <robertj@gmx.net> wrote in message
> news:cliipp$hjc$00$1@news.t-online.com...
> > Hi Serg,
> >
> > > A little correction.
> > > Of course i see the StackTrace of client side. But it does not include
> > > servers StackTrace.
> > > I want to see the StackTrace from server side and for all
> InnerExceptions.
> > > It is unhelpful to me to see that exception occurs in my clients
method
> that
> > > calls some remote object. After that i should debug my server app to
> find
> > > where the original exception occurs. It takes a LOT of time.
> >
> > You may try this
> >
> > server.exe.config:
> >
> > <configuration>
> > <system.runtime.remoting>
> > <customErrors mode="off" />
> > ...
> >
> > bye
> > Rob
>
>


Serg

10/26/2004 7:43:00 AM

0

Yes I am looking at InnerException. This is the most important info for me.
But for all InnerExceptions StackTrace is empty string.
When I am checking them on server side before serialization they are non
empty. But when catched on clients side StackTrace is empty.



"Ken Kolda" <ken.kolda@elliemae-nospamplease.com> wrote in message
news:u#2t2kquEHA.2192@TK2MSFTNGP14.phx.gbl...
> When you look at the exception that you catch on the client, do you look
at
> the InnerException property? The client catches the server's exception and
> then re-throws its own, with the server exception being set as the inner
> exception for the new one. So, to get to the server stack trace, you would
> do:
>
> try
> {
> ...
> }
> catch (Exception ex)
> {
> Console.WriteLine(ex.InnerException.StrackTrace);
> }
>
> Ken
>
>
> "Serg" <sergNOSPAM@alef.ru> wrote in message
> news:eZd1WGpuEHA.3152@TK2MSFTNGP14.phx.gbl...
> > Hi Robert
> >
> > I have tried to switch this.
> > It switches off/on Message property, but it does not have any affect on
> > StackTrace property :(
> > According to MSDN it should, but it does not.
> > I can`t see any concerned switches.
> > There only remains to think that this is an error in Framework_1.1
> > Hope it will be fixed.
> >
> >
> >
> > "Robert Jordan" <robertj@gmx.net> wrote in message
> > news:cliipp$hjc$00$1@news.t-online.com...
> > > Hi Serg,
> > >
> > > > A little correction.
> > > > Of course i see the StackTrace of client side. But it does not
include
> > > > servers StackTrace.
> > > > I want to see the StackTrace from server side and for all
> > InnerExceptions.
> > > > It is unhelpful to me to see that exception occurs in my clients
> method
> > that
> > > > calls some remote object. After that i should debug my server app to
> > find
> > > > where the original exception occurs. It takes a LOT of time.
> > >
> > > You may try this
> > >
> > > server.exe.config:
> > >
> > > <configuration>
> > > <system.runtime.remoting>
> > > <customErrors mode="off" />
> > > ...
> > >
> > > bye
> > > Rob
> >
> >
>
>