HighTechTalks DotNet Forums  

HWta is the best common way ? (loosing my hairs...stil one)

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


Discuss HWta is the best common way ? (loosing my hairs...stil one) in the Dotnet Framework (Remoting) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
=?Utf-8?B?Y2FsZGVyYXJh?=
 
Posts: n/a

Default HWta is the best common way ? (loosing my hairs...stil one) - 06-01-2007 , 11:07 AM






Dear all,

I start to loos my hairs , hope anyone could help me to avoid loosing more.
I have build a remoting component host in a window service which is in
charge to store data to SQL database if everything works fine.

I have using it as server-activate and singleton mode with tcp chanel
Everything works fine when no erro occurs.

Now my simple question is :
What is the best way to informed my client application which place a call to
my server, that something went wrong fro instance when storing data ?

My client for instance is placing a call to a Send() method in my remote
object. I have try to get return Treu or false from my Send method, but from
client side did not receive it.

I have try to implement a GetLastError() public method from my remote
aplpciation , that my cilent can call to get an error message string. Eeems
toi be the same..

I am now thinking to throw custom exception from my server object, that my
client must implement in case something goes wrong... But might be not a good
way.

I could of cours send the full exception descriprtion to eventlog, but for
my final user and for security reason I would like to return to my user a
more simple message like (" Insert data failed")

How to do then in proper and simple way ?

thnaks for hlep
Serge

Reply With Quote
  #2  
Old   
Thomas
 
Posts: n/a

Default Re: HWta is the best common way ? (loosing my hairs...stil one) - 06-06-2007 , 09:35 AM






You can throw exception on the server side and catch it on the client
one - where you expect it could happen (I assume you would wrap the call
of the Send method with try/catch block). On the client side you can
display user friendly message instead of exception message.

Regards,
Thomas

-----------------------------------------
NConstruct - Intelligent Software Factory
http://www.nconstruct.com
-----------------------------------------




calderara wrote:
Quote:
Dear all,

I start to loos my hairs , hope anyone could help me to avoid loosing more.
I have build a remoting component host in a window service which is in
charge to store data to SQL database if everything works fine.

I have using it as server-activate and singleton mode with tcp chanel
Everything works fine when no erro occurs.

Now my simple question is :
What is the best way to informed my client application which place a call to
my server, that something went wrong fro instance when storing data ?

My client for instance is placing a call to a Send() method in my remote
object. I have try to get return Treu or false from my Send method, but from
client side did not receive it.

I have try to implement a GetLastError() public method from my remote
aplpciation , that my cilent can call to get an error message string. Eeems
toi be the same..

I am now thinking to throw custom exception from my server object, that my
client must implement in case something goes wrong... But might be not a good
way.

I could of cours send the full exception descriprtion to eventlog, but for
my final user and for security reason I would like to return to my user a
more simple message like (" Insert data failed")

How to do then in proper and simple way ?

thnaks for hlep
Serge

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.