Adding Async=true to the page- no side effects noticed.

Recently I needed to implement PageAsyncTask  in .Net 4 web forms application.

"A PageAsyncTask object must be registered to the page through the RegisterAsyncTask method. The page itself does not have to be processed asynchronously to execute asynchronous tasks. You can set the Async attribute to either true (as shown in the following code example) or false on the page directive and the asynchronous tasks will still be processed asynchronously:

<%@ Page Async="true" %>

When the Async attribute is set to false, the thread that executes the page will be blocked until all asynchronous tasks are complete."

I was worry about any site effects if I will set  Async=true on the existing page.
The only documented restrictions, that I found are that
@Async is not compatible with @AspCompat and Transaction attributes (from @ Page directive  MSDN article). In other words, 
Asynchronous pages do not work when the AspCompat attribute is set to true or the Transactionattribute is set to a value other than Disabled in the @ Page directive

From our tests we conclude, that adding Async=true to the page is quite safe, even if you don't always call Async tasks from the page 
posted @ Sunday, September 30, 2012 11:55 AM
Print

Comments on this entry:

No comments posted yet.

Your comment:



(not displayed)

 
 
 
 
 

Live Comment Preview:

 
«April»
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910