|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
An event was unable to invoke any of the subscribersdatabase 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(); |
|||||||||||||||||||||||