I am trying to log a caught exception to elmah while inside of an open transaction. I have created another transaction to do this, but I am not sure if this is the best route or if I am using it correctly. If I do not create another transaction and an error occurs the caught exception will be inserted using the transaction and will be included in the rollback. Is this ok or is there a better way to do it?
try
{
using (TransactionScope ts = new TransactionScope())
{
sqlCon.Open();
try
&nb ...
Go to the complete details ...