Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
The delegate that i have created
C#
private delegate void SaveAudit(Dictionary<string, object> auditInfo);


The method that will invoke the main menthod method asynchronously
C#
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
C#
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
Updated 14-May-12 3:00am
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900