473,327 Members | 1,930 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,327 software developers and data experts.

artificially persisted web controls cause problems with the aspx handler

PJ6
Taken out of context I know this may seem like a strange thing to do, but
just take this as an academic question if necessary...

Calling methods on a persisted control that has been added to a page that
has been rendered and unloaded generates these exceptions -

A first chance exception of type 'System.Net.Sockets.SocketException'
occurred in System.dll
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in mscorlib.dll
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in System.Web.dll

This happens even if I take the control out of the original page, and
regardless whether I persist it as a static or a session variable.

Now I really wouldn't care about these silent errors, provided they didn't
affect anything, but this is not the case; web projects with persisted
controls tend to hang on startup - the beginning page's render method is
fired, but the browser load continues indefinitely, and pausing execution
just shows dissassembly.

Why don't I just handle .aspx myself... well I don't have access to the
methods that properly load pages. I would have to use my own control
classes, not based on any of the existing object model already provided.
Certainly doable considering I do not need view state, but this would
require additional work that I have to justify. I will be making my own
control base classes later, but the render output will not be HTML.

So... the question is, is there anyone with suffcient knowledge of the
internal workings of the .aspx handler to tell me if it is possible to
persist already rendered controls without a problem?

Paul
Jul 24 '07 #1
3 1775
PJ6
I changed Response.End to
HttpContext.Current.ApplicationInstance.CompleteRe quest and now everything
is fixed. I had incorrectly assumed the problem was coming from the novel
direction of the web project.

Paul

"PJ6" <no***@nowhere.netwrote in message
news:e6*************@TK2MSFTNGP05.phx.gbl...
Taken out of context I know this may seem like a strange thing to do, but
just take this as an academic question if necessary...

Calling methods on a persisted control that has been added to a page that
has been rendered and unloaded generates these exceptions -

A first chance exception of type 'System.Net.Sockets.SocketException'
occurred in System.dll
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in mscorlib.dll
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in System.Web.dll

This happens even if I take the control out of the original page, and
regardless whether I persist it as a static or a session variable.

Now I really wouldn't care about these silent errors, provided they didn't
affect anything, but this is not the case; web projects with persisted
controls tend to hang on startup - the beginning page's render method is
fired, but the browser load continues indefinitely, and pausing execution
just shows dissassembly.

Why don't I just handle .aspx myself... well I don't have access to the
methods that properly load pages. I would have to use my own control
classes, not based on any of the existing object model already provided.
Certainly doable considering I do not need view state, but this would
require additional work that I have to justify. I will be making my own
control base classes later, but the render output will not be HTML.

So... the question is, is there anyone with suffcient knowledge of the
internal workings of the .aspx handler to tell me if it is possible to
persist already rendered controls without a problem?

Paul

Jul 24 '07 #2
most of the server controls use viewstate to hold all property values,
so you will need a valid viewstate. the render streams and the Page
object are also invalid.

if you want to persists controls, you should make a persisted page, then
add them to the page.

-- bruce (sqlwork.com)

PJ6 wrote:
Taken out of context I know this may seem like a strange thing to do, but
just take this as an academic question if necessary...

Calling methods on a persisted control that has been added to a page that
has been rendered and unloaded generates these exceptions -

A first chance exception of type 'System.Net.Sockets.SocketException'
occurred in System.dll
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in mscorlib.dll
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in System.Web.dll

This happens even if I take the control out of the original page, and
regardless whether I persist it as a static or a session variable.

Now I really wouldn't care about these silent errors, provided they didn't
affect anything, but this is not the case; web projects with persisted
controls tend to hang on startup - the beginning page's render method is
fired, but the browser load continues indefinitely, and pausing execution
just shows dissassembly.

Why don't I just handle .aspx myself... well I don't have access to the
methods that properly load pages. I would have to use my own control
classes, not based on any of the existing object model already provided.
Certainly doable considering I do not need view state, but this would
require additional work that I have to justify. I will be making my own
control base classes later, but the render output will not be HTML.

So... the question is, is there anyone with suffcient knowledge of the
internal workings of the .aspx handler to tell me if it is possible to
persist already rendered controls without a problem?

Paul

Jul 24 '07 #3
PJ6
How would you recommend creating a persisted page (differently than how the
default aspx hadler does it?) and ensuring that it is properly initialized
(OnInit/OnLoad recusrive)?

Paul

"bruce barker" <no****@nospam.comwrote in message
news:Of*************@TK2MSFTNGP02.phx.gbl...
most of the server controls use viewstate to hold all property values, so
you will need a valid viewstate. the render streams and the Page object
are also invalid.

if you want to persists controls, you should make a persisted page, then
add them to the page.

-- bruce (sqlwork.com)

Jul 25 '07 #4

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

Similar topics

0
by: Richard Payne | last post by:
I am developing a web application that utilises multiple grids, panels, validation controls etc on the same page. I have added the appropriate code to pop up dialogs to confirm delete in...
8
by: Matthew Louden | last post by:
why need to set autopostback property to be true?? I know autopostback event means to send the form to the server automatically. I tried checkbox, checkbox list, radio button, and radio button...
2
by: luca | last post by:
I'm trying to build a Server Control, it's a calendar to manage sellers appointments (don't answer me to use and custumize Calendar Control because unluckily it's not possible for this specific...
2
by: Patrick | last post by:
I want to define a set of web-form templates in XML and render the equivalent web-form with ASP.NET, then process any input server controls on the form. Reading the XML file from Page_load is...
22
by: Mr Newbie | last post by:
I was thinking about developing a workflow application yesterday and was musing over the different approaches than one could take in restricting specific actions on a ticket( Form ) at any said...
4
by: John Kotuby | last post by:
Hi all, I am using a Repeater in conjunction with a SQLDatasource and SQL Server. One of the controls in the repeater is a HyperlLink as follows: <asp:HyperLink...
0
JimWu
by: JimWu | last post by:
I have some problems in my code. The stutiation illustrate as the followsing statement. I use two pages, one, named "upload.aspx", is including several general html input tag, whose type are...
19
by: ThatsIT.net.au | last post by:
I come from a classic asp background, but have started using ASP.NET about 12 months ago, but I'm still not sure about the pros and cons of using controls v HTML spat out from code as you would in...
4
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.