Questions tagged [pageasynctask]
18 questions
3
votes
0 answers
Page RegisterAsyncTask server strange behaviour
Current context:
We have a web page that requires multiple lists to be loaded in parallel and we decided to do that with Page.RegisterAsyncTask (once we do that we call Page.ExecuteRegisteredAsyncTasks(), the methods just load data, that will be…

Tudor Dumitriu
- 51
- 3
2
votes
1 answer
PageAsyncTask time is the same as sequential process?
Why is the following ASP.NET code using PageAsyncTask executes in total of 8 seconds regardless if I run it as is or if I comment 2 lines with PageAsyncTask and un-comment Thread.Sleep(5000) in Page_load?:
//PageAsyncTask asyncTask1 = new…

user1112906
- 61
- 1
- 8
2
votes
1 answer
ASP.NET chained asynchronous calls
I have an ASP.NET page that needs to make calls to multiple web services to return data. I'd like to run these requests in parallel, and using the PageAsyncTask class appears to be the most appropriate way to do that. The trick is that there are…

joelt
- 2,672
- 2
- 24
- 32
2
votes
2 answers
AsyncTask execution need to cancel in same fragment when make request from Navigation Drawer's every List Items
My Question is i need to open SAME FRAGMENT from Navigation Drawer's every List Item 's, and when fragment display, If AsynTask execution is On Going then AsyncTask execution should be cancel.
How can i do it?
I tried so many ways to accomplish…

Dharmesh Baldha
- 820
- 6
- 11
2
votes
1 answer
PageAsyncTasks don't wait for completion when page created using BuildManager.CreateInstanceFromVirtualPath
I have a page that I have added an async task to, using Page.RegisterAsyncTask. If the page is accessed normally, eg by navigating to "/foo.aspx", then everything works as expected. The app has some rather complicated routing, and in some…

Jon
- 16,212
- 8
- 50
- 62
1
vote
2 answers
PageAsyncTask and HttpContext
I am using the PageAsyncTask object to execute some elements in parallel on a standard ASP.NET page. However I need one task to have access to Http Session. Is there a way to get the Http Session passed to the PageAsyncTask?

Michael Edwards
- 6,308
- 6
- 44
- 75
1
vote
0 answers
RegisterAsyncTask doesn't run asynchronous task in ASP.Net Web Forms page
I have a login page in an ASP.Net web forms application. On successful login it does some time-consuming database operations which is slowing the login process, so I want to run these asynchronously.
I am trying to do this in the recommended way…

PRS
- 741
- 1
- 7
- 27
1
vote
1 answer
PageAsyncTask Not Running in Parallel
I am examining async web pages async="True". In Page_Load, I am registering 3 tasks using RegisterAsyncTask. Each of these tasks is calling a SQL Server stored procedure. The stored procedure is doing a simple select and waiting for a couple of…

sh_kamalh
- 3,853
- 4
- 38
- 50
1
vote
1 answer
How can I turn a Task into a PageAsyncTask in C# 4.0?
The following doesn't compile. This is for asynchronous calls in a 4.0, aspx WebForms page.
var task = Task.Factory.StartNew(() => Thread.Sleep(100));
var pat = new PageAsyncTask(task); //Doesn't compile, no such…

MatthewMartin
- 32,326
- 33
- 105
- 164
1
vote
1 answer
PageAsyncTask endHandler to update the calling page
I've been coerced into applying Microsoft's PageAsyncTask objects, which I am new to (before I've always used jQuery AJAX calls). I've got everything working just right except once the work is done and the endHandler is called, how do I have the…

Honus Wagner
- 2,830
- 13
- 44
- 61
1
vote
1 answer
PageAsyncTask Timeout - How to stop execution of async code
I'm trying to implement Async calls in a classic ASP.NET web page.
I'm following the instructions I've found here and I can get it to call asynchronously but I don't know how to cancel the execution of the async method when the request times out…

Guy Lowe
- 2,115
- 1
- 27
- 37
1
vote
1 answer
Response never ends with PageAsyncTask?
I have to support an old project which uses PageAsyncTask with webforms vs2010 fw4.
However this simple code does compile + execute( no errors in debug mode / trace mode) but the response never ends.
Looking in debug mode + breakpoints - it reaches…

Royi Namir
- 144,742
- 138
- 468
- 792
0
votes
0 answers
PageAsyncTask messes threads
I have a category page (Classic ASP.NET) which loads products from DB (MS SQL Server). Each product (implemented as userControl) has its own databound controls. I want to load these product controls in parallel so I created a helper module which…

Alex Kudryashev
- 9,120
- 3
- 27
- 36
0
votes
2 answers
PageAsyncTask without blocking page load
I am trying to find a way to perform an asynchronous method in the Page_Load method of a webforms page, without blocking the page load for the user. I am using the following code:-
C# Code behind
public partial class _Default : Page
{
protected…

Joe
- 1,847
- 2
- 17
- 26
0
votes
1 answer
PageAsyncTask - When it times out, do I need to tidy up the long call?
I'm using PageAsyncTask to call a WCF service in c# (.Net 3.5).
My question is, do I need to tidy up the proxy on time-out, or is this unnecessary because it is created in a Using block?
Here's some pseudo code which includes some "tidy-up" code on…

DomBat
- 1,981
- 5
- 27
- 42