![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |