473,386 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Exception in custom sink not handled when debugging

I have a very odd problem which I hope someone can help me with. I have
written a very simple test program using remoting as an excercise in using a
custom sink - just a simple server with a single method called GetReply() and
a simple client. After configuring the remoting the code in the client looks
like this:

try
{
responseTextBox.Text = server.GetReply();
}
catch (Exception MyErr)
{
MessageBox.Show(MyErr.Message, MyErr.GetType().ToString());
}

Now, if I run the client without running the server I expect to get an
exception, which indeed I do - a SocketException with the message "No
connection could be made because the target machine actively refused it", and
without the custom sink this exception is caught in the above code and the
message box displayed, just as you would expect.

However, when I add in the custom sink the behaviour changes - but ONLY when
I am debugging in Visual Studio. Now the exception is flagged up in my
IClientChannelSink.ProcessMessage() method by the debugger as an unhandled
exception when it calls the ProcessMessage() method on the next sink. If I
continue execution after the exception the message box is shown as before.
Also, if I run the program outside the development environment it behaves as
expected.

The custom sink will eventually be used in a 'real'application, in which it
is quite acceptable for the client to run without the server, catch the
exception and react accordingly. However, it is making debugging very
difficult if, whenever I run the client in the development environment, it
halts at this exception.

I have already posted this in the MSDN forums, and I hope I haven't gonr
against any protocols by posting it here as well, but I can't get any
solution and it's really a probelm. It does seem like a bug that maybe should
be reported to Microsoft. If anyone can shed any light on this I would be
most grateful. I am using C# in Visual Studio 2005 with .NET2.0. The demo
program is available on request.

--
Dave
Feb 26 '07 #1
0 1299

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jeff | last post by:
Hello, I have a Windows Forms application in which I've implemented custom exception handling for most of the UI-related methods. If an exception occurs, it is "caught" and passed on to a...
0
by: Oliver | last post by:
Hello, I may have posted in the wrong place, if so, feel free to move my post (just notify me where you put it via email or something) I’m having a problem with my program that I cant...
1
by: Ollie Riches | last post by:
I have written a custom logging sink for the enterprise library logging application block (June 2005). I have been able to configure it as expected from the UI config tool (EntLibConfig.exe). I...
0
by: Mike Grishaber | last post by:
I am using .NET Remoting to connect my incoming HTTP Requests to my business logic. I am using a custom IHttpAsyncHandler to receive the incoming HTTPRequests and then I forward the...
2
by: kpax | last post by:
Hi, While debugging my application when an explicit exception is thrown by me (or an implicit exception is thrown internally) which is not handled anywhere in the stack, the execution breaks as...
1
by: otto | last post by:
Hi, all: My question is as follows. I have one ASP.NET application that comunicates with a remote object hosted under IIS throught .NET Remoting. I have to use custom sink in order to add extra...
5
by: Samuel R. Neff | last post by:
When you have an unhandled exception in vb.net how do you view the exception information in the debugger? In C# the debugger creates a local variable that points to the exception and you can...
6
by: Miro | last post by:
I can run an exe ( and its install ) i have created on my machine. The exe has a button that populates a dataset and then shoots it to a crystal report. But... Installing the setup.exe on my...
4
by: Miro | last post by:
<i have also added this reply to the other newsgroup - now that I have realizd ( and assuming ) it is not a localized error directly to vb.> I have found this link on the website:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.