HighTechTalks DotNet Forums  

How to break sink chain

Dotnet Framework (Remoting) microsoft.public.dotnet.framework.remoting


Discuss How to break sink chain in the Dotnet Framework (Remoting) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
sirtap
 
Posts: n/a

Default How to break sink chain - 09-26-2006 , 05:05 PM






Hello
I have implemented a sink (.net remoting) and I wonder how could I break
the process of execution of a remote method.
For example, I check a data in CallContext
string session = (string)lcc.GetData("www_session");
and if session is incorrect a don't want to call a method in remote object.
Instead I want to return to user some information.

I tried to throw an exception, but I got an error "exception was unhandled
by user code" in server sink.

How could I do it?

Regards
Andrew



Reply With Quote
  #2  
Old   
Jonathan Boivin
 
Posts: n/a

Default Re: How to break sink chain - 09-26-2006 , 06:38 PM






Did you try to throw a serializable exception ?

--

Thanks,
Jonathan Boivin
---
Email : jonathanboivin (AT) cints (DOT) net
CyberInternautes : http://www.cints.net
"sirtap" <sirtap (AT) poczta (DOT) onet.pl> a écrit dans le message de news:
efc4m7$cg6$1 (AT) inews (DOT) gazeta.pl...
Quote:
Hello
I have implemented a sink (.net remoting) and I wonder how could I break
the process of execution of a remote method.
For example, I check a data in CallContext
string session = (string)lcc.GetData("www_session");
and if session is incorrect a don't want to call a method in remote
object. Instead I want to return to user some information.

I tried to throw an exception, but I got an error "exception was unhandled
by user code" in server sink.

How could I do it?

Regards
Andrew





Reply With Quote
  #3  
Old   
sirtap
 
Posts: n/a

Default Re: How to break sink chain - 09-27-2006 , 03:59 AM



Hi
It's quit weird situation. I'm throwing a RemotingException and Visual
Studio (while debugging) stops at it and says "RemotingException was
unhandled by user code".
But when I run a compiled server program (exe), and then a client program
(exe) and enforce server to throw an exceptions, everything is going
alright. Client is catching this RemotingException (with correct
description) in a try-catch block!
So, VisualStudio doesn't know, that this exception is catched on the client
side. How can I enforce him to ignore this situation while debugging??

Regards
Andrew


"Jonathan Boivin" <djon (AT) cyberinternautes (DOT) net> wrote

Quote:
Did you try to throw a serializable exception ?

--

Thanks,
Jonathan Boivin
---



Reply With Quote
  #4  
Old   
Jonathan Boivin
 
Posts: n/a

Default Re: How to break sink chain - 09-27-2006 , 10:37 AM



You can probably use the DebuggerStepThroughAttribute like for the
InitializeComponent method.

But I'm not quite sure if this attribute is the appropriate one. You can
search for the System.Diagnostic members and you will see all the available
attributes in relation with the debuger. The other one you could probably
use is DebuggerHiddenAttribute.

--

Thanks,
Jonathan Boivin
---
Email : jonathanboivin (AT) cints (DOT) net
CyberInternautes : http://www.cints.net
"sirtap" <sirtap (AT) poczta (DOT) onet.pl> a écrit dans le message de news:
efdbbi$dkn$1 (AT) inews (DOT) gazeta.pl...
Quote:
Hi
It's quit weird situation. I'm throwing a RemotingException and Visual
Studio (while debugging) stops at it and says "RemotingException was
unhandled by user code".
But when I run a compiled server program (exe), and then a client program
(exe) and enforce server to throw an exceptions, everything is going
alright. Client is catching this RemotingException (with correct
description) in a try-catch block!
So, VisualStudio doesn't know, that this exception is catched on the
client side. How can I enforce him to ignore this situation while
debugging??

Regards
Andrew


"Jonathan Boivin" <djon (AT) cyberinternautes (DOT) net> wrote in message
news:OPubByb4GHA.292 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Did you try to throw a serializable exception ?

--

Thanks,
Jonathan Boivin
---





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.