<p>I want to catch all unhandled exceptions thrown in a remote object on <em>the server</em> and log them there before I translate them into some custom exception so that specific exceptions do not cross the client/server boundary.</p>

<p>I think I have to use a custom channel sync, but can anyone confirm this and/or have any other advice to give? </p>

[{'answer_id': 42744, 'author': 'Guy Starbuck', 'author_id': 2194, 'author_profile': 'https://Stackoverflow.com/users/2194', 'pm_score': 1, 'selected': False, 'text': '<p>I would use the Microsoft Enterprise Library Exception Handling app block -- it lets you handle errors and convert specific types of exception to a different type of exception before rethrowing to the client.</p>\n'}, {'answer_id': 585825, 'author': 'nickd', 'author_id': 2373, 'author_profile': 'https://Stackoverflow.com/users/2373', 'pm_score': 1, 'selected': True, 'text': '<p>After finding <a href="http://www.dotnetjunkies.com/WebLog/bikta/articles/17324.aspx" rel="nofollow noreferrer">Eliyahu Baker\'s</a> helpful blog post and reading chapter 12 of <a href="https://rads.stackoverflow.com/amzn/click/com/1590594177" rel="nofollow noreferrer" rel="nofollow noreferrer">Rammer\'s Advanced .NET Remoting</a> I wrote a custom channel sink that does what I want. This intercepts any exception and logs it locally before sending it on to the client.</p>\n\n<p>Ideally, I\'d like to log the exception and raise a more generic one for the client, but I haven\'t cracked that nut yet.</p>\n'}]
['https://Stackoverflow.com/questions/42732', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2373/']