Home All Groups Group Topic Archive Search About

An event was unable to invoke any of the subscribers

Author
15 Feb 2006 8:20 PM
ss
I am working with distributed transactions. When I open and close the
database
multiple times within one single distributed transaction, then the 11th

time
fails when the database is closed. I receive "An event was unable to
invoke any of the subscribers".   Any help is greatly appreciated.
Sample version of my code is as follows:

ServiceConfig cfg = new ServiceConfig();
cfg.Transaction = TransactionOption.Required;
ServiceDomain.Enter(cfg);


for (int i = 0; i < 20; i++) {
        using (SqlConnection conn = new


SqlConnection("server=.;database=pubs;Trusted_Connection=Yes;Enlist=false;"­))

{
                conn.Open();
                conn.EnlistDistributedTransaction((ITransaction)
                        ContextUtil.Transaction);
                using (SqlCommand cmd = new SqlCommand("update authors
set au_lname =
au_lname", conn))  {
                        cmd.ExecuteNonQuery();
                }
                conn.EnlistDistributedTransaction(null);
        }


}


ServiceDomain.SetComplete();
ServiceDomain.Leave();

Author
19 Feb 2006 1:00 AM
ss
I am at wits end... any idea?

AddThis Social Bookmark Button