Transaction context in use by another session

  • Thread starter Thread starter PL
  • Start date Start date
P

PL

We are getting this error intermittently and I have failed to find find a solution
since I don't fully understand the issue.

All I can gather is that the transaction is running too long and this is the cause
of the problem (?)

If someone could suggest a solution I would really appreciate it, or give more
clues on the cause of the error.

Shortening the time the transaction runs is not really possible since we use a payment
gateway which can take up to 2-3 minutes.

PL.
 
Can you post some details around your scenario and on what you code is doing
when this occurs?

--
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.

This posting is provided "AS IS" with no warranties, and confers no rights.
 
I shortened the path in the code that needed to be in the transaction by skipping
the Transaction="Required" and instead using a SqlTransaction object and it seem
to work much better.

The error appeared when I tried to access another database using a different
connection string, I was loading localized language resources from a completely
different database, apparently this caused an issue when being in the same transaction.

However, the error didn't always appear, possibly because I was caching the resources.

PL.
 
Back
Top