Problem from ASP.NET calling Asynchronous operations

Another quick fix to a common problem asked in the ASP.NET Forums

When trying to run Asynchronous operations in a ASP.NET page (ASPX) or a page calling a webservice that makes Asynchronous calls, you want to make sure the page is mark with the correct property otherwise an Exception with the error will be thrown.

<%@ Page Language="C#" AutoEventWireup="true" Async="true" CodeBehind="Test.aspx.cs"

Asynchronous operations are not allowed in this context. Page starting an asynchronous operation has to have the Async attribute set to true and an asynchronous operation can only be started on a page prior to PreRenderComplete event.

Cheers

Al

Follow me in twitter | bookmark me | Subscribe to my feed | Add stats to your blog

Published Tuesday, May 05, 2009 10:00 PM by albertpascual
Filed under: ,

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required)