473,729 Members | 2,235 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

StackOverflowEx ception after Page.Unload - how to debug?

Hi!

I've got an asp.net page that works for all users except one and that one
user only gets the error with a certain parameter set to a certain value.
(Same value as the others, but for this one it fails). I manage to reproduce
the error on my development computer, but it's completely impossible to
debug or trace the error. The page had for some reason aspCompat set to
true, and that gave a short stack trace, when set to false there's none at
all. See copied content below. Anyone have any ideas how to find the cause
for this? (I can start eliminating data in the db for the relevant user, but
I'd like to get some input first)

As mentioned in the topic, the exception is thrown some time after
Page.Unload, and I haven't found any reasonable event or overload that
should be able to catch the exception. (Page.Error doesn't....) I don't get
any trace either.. I tried putting a Response.End() after base.Render() in a
Render overload and that made the page work as expected. All DB operations
both on postback and first request including rendering etc. etc. runs fine.

Without aspCompat:
---------
Exception of type System.StackOve rflowException was thrown.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.StackOve rflowException: Exception of type
System.StackOve rflowException was thrown.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[StackOverflowEx ception: Exception of type System.StackOve rflowException was
thrown.]
---------

With aspCompat:
-------------
Exception of type System.StackOve rflowException was thrown.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.StackOve rflowException: Exception of type
System.StackOve rflowException was thrown.

Source Error:

[No relevant source lines]
Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322\ Temporary ASP.NET
Files\webcompet ence\87bc3de7\4 7398267\zksnyfr b.0.cs Line: 0

Stack Trace:

[StackOverflowEx ception: Exception of type System.StackOve rflowException was
thrown.]

[HttpException (0x80004005): Exception of type System.Web.Http Exception was
thrown.]
System.Web.Http AsyncResult.End ()
System.Web.Util .AspCompatAppli cationStep.EndA spCompatExecuti on(IAsyncResult
ar)
System.Web.UI.P age.AspCompatEn dProcessRequest (IAsyncResult result)
ASP.samtaler_re sultat_new_aspx .EndProcessRequ est(IAsyncResul t ar) in
c:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322\ Temporary ASP.NET
Files\webcompet ence\87bc3de7\4 7398267\zksnyfr b.0.cs:0
System.Web.Call HandlerExecutio nStep.OnAsyncHa ndlerCompletion (IAsyncResult
ar)
-------

Lars-Erik
Nov 19 '05 #1
8 2497
what COM component is this? check the author's website to see if they have
support fixes. Apparently, your COM component is going south when the page
unloads

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
"Lars-Erik Aabech" <la******@newsg roup.nospam> wrote in message
news:uu******** ******@TK2MSFTN GP09.phx.gbl...
Hi!

I've got an asp.net page that works for all users except one and that one
user only gets the error with a certain parameter set to a certain value.
(Same value as the others, but for this one it fails). I manage to
reproduce the error on my development computer, but it's completely
impossible to debug or trace the error. The page had for some reason
aspCompat set to true, and that gave a short stack trace, when set to
false there's none at all. See copied content below. Anyone have any ideas
how to find the cause for this? (I can start eliminating data in the db
for the relevant user, but I'd like to get some input first)

As mentioned in the topic, the exception is thrown some time after
Page.Unload, and I haven't found any reasonable event or overload that
should be able to catch the exception. (Page.Error doesn't....) I don't
get any trace either.. I tried putting a Response.End() after
base.Render() in a Render overload and that made the page work as
expected. All DB operations both on postback and first request including
rendering etc. etc. runs fine.

Without aspCompat:
---------
Exception of type System.StackOve rflowException was thrown.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.StackOve rflowException: Exception of type
System.StackOve rflowException was thrown.

Source Error:

An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[StackOverflowEx ception: Exception of type System.StackOve rflowException
was thrown.]
---------

With aspCompat:
-------------
Exception of type System.StackOve rflowException was thrown.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.StackOve rflowException: Exception of type
System.StackOve rflowException was thrown.

Source Error:

[No relevant source lines]
Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322\ Temporary
ASP.NET Files\webcompet ence\87bc3de7\4 7398267\zksnyfr b.0.cs Line: 0

Stack Trace:

[StackOverflowEx ception: Exception of type System.StackOve rflowException
was thrown.]

[HttpException (0x80004005): Exception of type System.Web.Http Exception
was thrown.]
System.Web.Http AsyncResult.End ()

System.Web.Util .AspCompatAppli cationStep.EndA spCompatExecuti on(IAsyncResult
ar)
System.Web.UI.P age.AspCompatEn dProcessRequest (IAsyncResult result)
ASP.samtaler_re sultat_new_aspx .EndProcessRequ est(IAsyncResul t ar) in
c:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322\ Temporary ASP.NET
Files\webcompet ence\87bc3de7\4 7398267\zksnyfr b.0.cs:0

System.Web.Call HandlerExecutio nStep.OnAsyncHa ndlerCompletion (IAsyncResult
ar)
-------

Lars-Erik

Nov 19 '05 #2
Hi again L-E,

Seems you're still suffering some problems with your asp.net web
application. Is this one related to the former one and how did our PSS guys
go on it?

From your description and the call stack, seems there is few information we
can get from them. Are those COM components using in your web app your own
library or from some 3rd party ones? Would you provide some detail info on
the function of that COM component? Anyway, from my viewpoint, it's abit
hard to debug on the .net layer, we may need to dig into the unmanaged
world for such scenario. Also, since this is a user specific exception,
it'll be rather harder to trace.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #3
Hi guys! :)

Who mentioned COM? :P
I can't see anything in the exceptions implying this has to do with COM
interop?

Yup, I still have trouble with the app, thanks for noticing. :) I'm not sure
if it's related to my other problem, but it's the same page that starts the
mayhem (i think).

Anyway - this page doesn not need aspCompat, so I turned it off. There are
both third party and our own COM components here, in addition of course to
other .net libraries. I have no clue where to start, and still waiting for
response to our 200mb dump from yesterday relating to the other issue.

This one is not that critical tho, so I'm more interrested in hints about
how to proceed here than getting an actual solution. (Don't expect anyone to
tell me I have to change line 31 from crash() to dont_crash(). ;)
How can I trap the exact location the exception is thrown (when not in asp
compatibility mode)? I tried attaching the debugger to native in addition to
..net, but it doesn't break in any disassembled code. Not sure how I enable
JIT for unmanaged code...

L-E

"Steven Cheng[MSFT]" <v-******@online.m icrosoft.com> wrote in message
news:bE******** *******@TK2MSFT NGXA01.phx.gbl. ..
Hi again L-E,

Seems you're still suffering some problems with your asp.net web
application. Is this one related to the former one and how did our PSS
guys
go on it?

From your description and the call stack, seems there is few information
we
can get from them. Are those COM components using in your web app your own
library or from some 3rd party ones? Would you provide some detail info on
the function of that COM component? Anyway, from my viewpoint, it's abit
hard to debug on the .net layer, we may need to dig into the unmanaged
world for such scenario. Also, since this is a user specific exception,
it'll be rather harder to trace.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #4
Thanks for your response L-E,

OK. Since you mentioned the aspCompat, so I assumed that you again
encountered a COM problem:).

Well, since it's not a COM component, is it a pure .net component? As for
how to get the exact location of the exception, have you verified whether
the exception occured inside that 3rd party component or within your page's
code?

Also, to runtime debug the unmanaged code, the disassembled code is not
sufficient, we need the symbol or pdb file of the component and generally
those components are release version which don't contains info for us to
directly debug into code level. If you're trying to locate the error
location in asp.net, we can turn on the application's trace and output
trace statement in your page events so as to locate the problem.

BTW, since the error is user specific, I'm thinking whether it is related
to your appliation(incl ude the IIS)'s authentication mode or any other
security things. Is there security related things in your application or
those components?

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 19 '05 #5
Hi again!
Well, since it's not a COM component, is it a pure .net component? As for
how to get the exact location of the exception, have you verified whether
the exception occured inside that 3rd party component or within your
page's
code?
There are both third party and our own COM components here, in addition of
course to
other .net libraries. The exception occurs some time after Page_Unload, but
I haven't been able to trace/break at Dispose().
Also, to runtime debug the unmanaged code, the disassembled code is not
sufficient, we need the symbol or pdb file of the component and generally
those components are release version which don't contains info for us to
directly debug into code level. If you're trying to locate the error
location in asp.net, we can turn on the application's trace and output
trace statement in your page events so as to locate the problem.
Trace fails, since the exception is thrown outside of the page logic. (At
least the logic exposed to me)
Also, if I insert Response.End() in Page_Render() which makes the page run
fine, tracing is disabled. Can I force tracing here somehow? (Ignoring the
exception for instance, or forcing the current trace output?)
BTW, since the error is user specific, I'm thinking whether it is related
to your appliation(incl ude the IIS)'s authentication mode or any other
security things. Is there security related things in your application or
those components?


The app is impersonating an administrator user and authenticates the users
through custom logic based on a cookie and a corresponding record in the DB.

L-E
Nov 19 '05 #6
Thanks for the response L-E,

So the exceptions occurs at the time out of our control. As for After
Unload , there seems something wrong at the time when disposing or realse
some of the components or COM objects. I'm still thinking it'll be better
if we can make the problem occur more frequently or regularly , is it
possible to repro the problem in a new created page which using those
components? If so, at least we can remove those components one by one to
isolate the cause.
Currently I also have no idea on any other better means ( if we can't
perform runtime debug or dump analysis as those PSS guys did ) How do you
think so?

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Nov 19 '05 #7
Actually, I haven't thought about using the elimination method here. I'll
try commenting out block by block related to each object in the page. Thanks
for the idea. :) I haven't got full priority on this one at the time, so
I'll hold the thread untill I (eventually) find a solution.

Lars-Erik

"Steven Cheng[MSFT]" <v-******@online.m icrosoft.com> wrote in message
news:yY******** ******@TK2MSFTN GXA02.phx.gbl.. .
Thanks for the response L-E,

So the exceptions occurs at the time out of our control. As for After
Unload , there seems something wrong at the time when disposing or realse
some of the components or COM objects. I'm still thinking it'll be better
if we can make the problem occur more frequently or regularly , is it
possible to repro the problem in a new created page which using those
components? If so, at least we can remove those components one by one to
isolate the cause.
Currently I also have no idea on any other better means ( if we can't
perform runtime debug or dump analysis as those PSS guys did ) How do you
think so?

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #8
OK. Hope we'll hear the good news from you soon :-)

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #9

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

Similar topics

5
17276
by: Jesee | last post by:
I am reading Jeffrey Richter's book "Applied Microsoft .NET Framework programming",i came across "Exception handing". Page 405 says "If the stack overflow occurs within the CLR itself,your application code won't be able to catch the StackOverflowException exception and none of your finally blocks will excute.",I don't understand it. Following C# statement: class App { static void Main() {
11
2912
by: Alx Sharp | last post by:
Hello group... I've created a collection class that implements the following interfaces: IBindingList, IList, ICollection, IEnumerable and ITypedList: abstract class DataCollectionBase : IBindingList, IList, ICollection, IEnumerable, ITypedList { private ArrayList innerList = null; private System.Type itemType = null; public DataCollectionBase()
1
2094
by: Steen Tøttrup | last post by:
I don't know if there is another newsgroup where I should ask this question..?? I have this .NET web application that I've build using .NET 1.1. Now I've moved it to .NET 2.0 beta 2, and suddently I'm getting all sort of strange behaviour!! I'm using a HttpHandler (not .aspx files). When I have to output the content of a page, I load the content classes with reflection. If the user does not have permissions to see the content...
2
6874
by: brianbender | last post by:
I am trying to load and unload assemblies dynamically and call methods and properties when loaded into an Appdomain I can load assemblies all day in the current AppDomain without references and without interfaces if need be. But try as I may they will ot unload. I have been working on this problem for weeks. I have seen other apps using Remoting but I know there has got to be a way to create a child AppDomain and reference obkect via...
6
18426
by: Mike | last post by:
I have a web form in my application that will be used for both viewing and updating information. I have a requirement that if any data has been changed on the page and the user attempts to leave the page without saving, the user gets prompted with a message asking if they want to save changes. It seemed logical to put any code to handle this in the page unload event, however the page unload event gets fired every time the page does a post...
10
14852
by: Mae Lim | last post by:
Dear all, I'm new to C# WebServices. I compile the WebService project it return no errors "Build: 1 succeeded, 0 failed, 0 skipped". Basically I have 2 WebMethod, when I try to invoke the first method it is working fine. Then when I try to invoke the second method it return me an error, Just In-Time Debugging, with error message "An exception 'System.StackOverflowException' has occurred in WebServices"
3
2608
by: Tao | last post by:
hi.. group, A wired question about FileSystemWatcher and Unload an AppDomain. I have a class A which creates class B. When B is created, B loads an AppDomain and execute some functions on the load AppDomain. B monitors disk to see if some files chang. If some file changes, B will try to unload the AppDomain it loaded before.
9
2494
by: =?Utf-8?B?d2luZHNpbQ==?= | last post by:
Hi, I have a project based on .Net 1.1 and VS 2003,now I am trying to upgrade it to .Net 2.0 and VS 2005.The project passes the 'Build Solution',but When I start Debug, it suddenly comes StackOverflowException and Debug stops. The main Exception point is the function below: public System.ComponentModel.PropertyDescriptorCollection GetStatefulPropertyDescriptors() {
5
5900
by: =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post by:
It seems that one page XBAP whose Unloaded event never get called, I need put some clearing stuff (I.G stop dispatcher time) when user close browser, it unload event doesn't work, where shall I put? -- ======================= Steven Tang SYWWUYU)
0
8913
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
8761
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
9426
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
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6722
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
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2162
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.