473,795 Members | 3,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unhandled Exception after Remointg...

In an ASP.NET Application I have an instance of a remoting object. After the
instance was created, I saved it in a Session variable. When I try to use
this instance with the Remoting Service down, it throw an exception wich it
is catched. After this exception is catched, another exception is throwed
outside my try-catch blocks. I can´t catch this new exception. This happen
only in first and second execution after application compile. After second
execution, (no mather how many times I execute the application) only one
exception is throwed.

When remoting object instance isn't in Session variable, only one exception
is throwed in all runs, no mather if it is the firts or the eleventh run.

Can anyone tell me why 2 exception are throwed in the first and second run
after compiling only if the remoting object instance is stored in Session.

Thanks in advantage

Salvador Ponticelli


Nov 15 '05 #1
1 1313
Salvador,

Once the exception happens, are you trying to access the object over
again? If you are, then this is a bad idea (assuming the exception is not
remoted from the other app domain, but rather, an issue with connecting to
the app domain). Basically, you should drop the proxy if this occurs, as it
is probably in an inconsistent state at that point.

The way executions work, it bubbles up the call stack, and can not
continue executing code, so the exception that is thrown after that (before
the next property access/method call on the object) would be from your code
(if you have caught the exception). In other words, only one exception can
be thrown per method call/property access.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- ni************* *@exisconsultin g.com
"Salvador Ponticelli" <sp*********@co rpl.com.ve> wrote in message
news:em******** ******@TK2MSFTN GP11.phx.gbl...
In an ASP.NET Application I have an instance of a remoting object. After the instance was created, I saved it in a Session variable. When I try to use
this instance with the Remoting Service down, it throw an exception wich it is catched. After this exception is catched, another exception is throwed
outside my try-catch blocks. I can´t catch this new exception. This happen
only in first and second execution after application compile. After second
execution, (no mather how many times I execute the application) only one
exception is throwed.

When remoting object instance isn't in Session variable, only one exception is throwed in all runs, no mather if it is the firts or the eleventh run.

Can anyone tell me why 2 exception are throwed in the first and second run
after compiling only if the remoting object instance is stored in Session.

Thanks in advantage

Salvador Ponticelli

Nov 15 '05 #2

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

Similar topics

7
2707
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote server returned an error: (500) Internal Server Error." I found a post that suggested to catch the WebException to retrieve the actual HttpWebResponse object for more information. The response returned is shown below. At first I thought this was a...
5
2070
by: Dave Stewart | last post by:
I recently wrote my first Vb.net application, or at least my first complex app since moving up from vb6. When run from the VS.NET IDE, the program shows no errors and runs fine. When the output exe is run(this is a windows application) on my development pc, the exe runs fine as well. When the application is deployed on any other machine with .net framework 1.1, it generates an unhandled exception prioir to loading anything. The setup project...
5
5751
by: Lucvdv | last post by:
Can someone explain why this code pops up a messagebox saying the ThreadAbortException wasn't handled? The first exception is reported only in the debug pane, as expected. The second (caused by thread.Abort()) is reported twice: once in the debug window, and once through the message box. Is it because the thread was sleeping when the exception occurred?
5
3312
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 view it in one of the windows (autos or locals, don't remember which). That doesn't appear to be the case with vb.net. I also tried using the command window to inspect "Err" but that gave nothing useful (always empty).
0
1991
by: Colmeister | last post by:
I recently read Jason Clark's excellent article on Unhandled Exceptions (http://msdn.microsoft.com/msdnmag/issues/04/06/NET/default.aspx) and have attempted to incorporate the features he talks about in a new application I'm writing. However, when I try to use ThreadStart to do some work in a separate thread from my GUI, the methods Jason described don't seem to catch the exception. Take the following source code: Public Class...
5
3404
by: Simon Tamman {Uchiha Jax} | last post by:
Now this is bugging me. I just released software for a client and they have reported an unhandled stack overflow exception. My first concern is that the entirity of the UI and any threaded operations are all within Try Catches to help me locate the problem and the origination of any problem by specifiying an error code in the "Catch" section. So theoretically this shouldn't have been possible (at which point we all say "yeah,...
0
1398
by: Bob | last post by:
If I induce and unhandled exception in my vb.net code for instance using '-- just a simple "object not initialized" exception (should read "as new") Dim x As Specialized.NameValueCollection MessageBox.Show(x.Count.ToString) When I run this code in the ide I get the IDE showing me the unhandled exception little dialog that comes up and suggest how I should corrcet my code. BUT I have the ApplicationEvents.VB class in which I have the...
1
6319
by: Bob | last post by:
In Vs 2005 you have new applicationsEvents.vb I was testing it in a simple app and found that it was easier to implement unhandled exception management tah it was in Vs2003 (vb.net) You can, if you want to, prevent your app from terminating on an unhandled exception, and for me this is important. In an Ivr app it will let me hang up the phone only on the line that triggered the unhandled exception, leaving other callers to complete their...
5
5167
by: =?Utf-8?B?c3VydHVyeg==?= | last post by:
Hi, I feel like a noob for asking this. When I publish a VB windows application, I want to disable the ability of the the user to continue when there is an unhandled exception. For example, if there is a bug in the program that causes an exception, I want the program to crash. If there is an unhandled exception the program is in an undefined state, and continuing could be dangerous. I'm surprised the
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10437
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.