Click here to Skip to main content
11,644,286 members (65,063 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.5 Async
The delegate that i have created
private delegate void SaveAudit(Dictionary<string, object> auditInfo);

The method that will invoke the main menthod method asynchronously
private void performAudit(string additionalInfo)
        {
            try
            {
                Dictionary<string, object> auditInfo = PrepareAuditInfo(additionalInfo);
                if (auditInfo != null)
                {
                    SaveAudit del = new SaveAudit(ProcessComponent.Data.ReportData.Audit);
                    del.BeginInvoke(auditInfo, null, null);
                }
            }
            catch (Exception ex) { ExceptionManager.Publish(ex); }
        }

This is the method that need to be invoked asynchronously
private void SaveAuditInfo(Dictionary<string, object> auditInfo)
        {
            try { ReportData.Audit(auditInfo); }
            catch (Exception ex)
            { ExceptionManager.Publish(ex); }
 
        }
the above code is working fine when i try to debug the application, but when i deploy it on the web server my asnyc asynchronous call is not saving the data in the database. Can any one tell me what is wrong in this code?

Appreciate ur help!!
Posted 14-May-12 2:57am
D Hari565
Edited 14-May-12 3:00am
(no name)114.8K
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 690
1 jyo.net 494
2 Sergey Alexandrovich Kryukov 429
3 Afzaal Ahmad Zeeshan 418
4 CPallini 336
0 OriginalGriff 925
1 DamithSL 636
2 Afzaal Ahmad Zeeshan 622
3 Sergey Alexandrovich Kryukov 548
4 CPallini 521


Advertise | Privacy | Mobile
Web01 | 2.8.150731.1 | Last Updated 14 May 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100