Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7694869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:25:00+00:00 2026-05-31T21:25:00+00:00

I am using temporary database for my unit tests that are created and deleted

  • 0

I am using temporary database for my unit tests that are created and deleted with each test but have been very careful to ensure that it shares the same setup as my ‘real’ database (enlist=false;multipleactiveresultsets=true;etc) but have been constantly running into MSDTC escalation issues wherever TransactionScope is being used.

After switching TransactionScope for Transaction I have solved the MSDTC escalation issue and run straight into a new problem – the transaction works perfectly as I use the application in the web browser, but it fails in unit testing with the following error:

SqlConnection does not support parallel transactions.

Without posting tons of code, has anyone else run into similar problems where the test environment and dev environment appear to work differently? Is there any general reason why a parallel transaction would work in dev and not in unit test mode?

If I cannot simulate exactly what is happening with my tests then what is the point in testing at all?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:25:01+00:00Added an answer on May 31, 2026 at 9:25 pm

    One big difference that I failed to account for was where I may be using RenderAction in a view, and therefore calling more controller actions than the test would, which may explain MSDTC/Transaction issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a temporary table that I'm using and I have a unique column,
I am using a temporary database in a project that is disposed on Application_End
I created very a simple database using Entity Framework 4. I'd like to be
Using the .net framework you have the option to create temporary files with Path.GetTempFileName();
If I declare a temporary auto deleted character buffer using std::auto_ptr<char> buffer(new char[n]); then
This query was working fine when the database was small, but now that there
Let's say I have a database that stores Fruit and FruitBasket s, and it's
I have a series of queries against a very mega large database, and I
I have an application that contains methods that work with data using Entity Framework
I have optimized a complex Oracle statement using temporary table like this : original

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.