AsyncCallback Not Working for long queries


Chumma Dede


I have a main web app where I am calling a method (ClaimsExport) in
a webservice asynchronously which initiates a DTS package to export to a
text file. That bit of code is as follows in the click event of a web form

Dim CExp As Claims = New Claims


Dim ExpClaimsCB As New AsyncCallback(AddressOf
Dim ar As IAsyncResult =
CExp.BeginClaimsExport(User.Identity.Name, TxtDivisions.Text.ToString,
txtDate1.Text.ToString, txtDate2.Text.ToString, txtDate3.Text.ToString,
txtDate4.Text.ToString, txtMaxRows.Text.ToString, ExpClaimsCB, CExp)

Public Sub ExportClaimsCallBack(ByVal ar As IAsyncResult)
Dim CExp As Claims = ar.AsyncState
Dim result As Boolean
result = CExp.EndClaimsExport(ar)
Application(User.Identity.Name & "ExportClmResult") =
result.ToString 'TODO
End Sub

Once the method is over, its supposed to run ExportClaimsCallBack. This
works perfectly EXCEPT when the webservice method takes a long time. In
this case the CallBack method is not getting called. Any ideas why this is
I have increased the timeouts in IIS for both the main web app and the web
service but still no luck.

Any ideas?
Chumma Dede


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question