I have a problem which make me turn around for 3 days. I'm using transaction scope in this transactioscope I insert say 5 values in 5 tables. The insertion goes correctly for the first 3 tables and totally ignore the 4th insertion and insert the 5th value correctly without any problem. No exception appears and no rollback occurs.
EDIT: This problem only occurs on the production server and it's not regularly occur. In few times it occur and the most times it works correctly without any problems.
Note: this problem started to be appeared after i host another application on the same server.
public void InsertStuff()
{
try
{
using(TransactionScope ts = new TransactionScope())
{
//perform insert 1
Tablel1.Insert();
//perform insert 2
Tablel2.Insert();
//perform insert 3 -
Tablel3.Insert();
//perform insert 4 - No insertion occur !!!!!
Tablel4.Insert();
//perform insert 5 - insertion works fine!!!!!
Tablel5.Insert();
ts.Complete();
}
}
catch(Exception ex)
{
throw ex;
}
}