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 190745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:16:56+00:00 2026-05-11T16:16:56+00:00

I am trying to use TransactionScope , but keep getting the exception below. The

  • 0

I am trying to use TransactionScope, but keep getting the exception below.
The app is running on a different machine than the database, if that matters. I am using SQL Server 2005.

Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network access in the security configuration
for MSDTC using the Component Services Administrative tool.

using (TransactionScope tsTransScope = new TransactionScope())
{
    //Do stuff here
    tsTransScope.Complete();
}

Edit

I made some changes based on the feedback. Now I’m getting this error:

“Error HRESULT E_FAIL has been returned from a call to a COM component.”
“Communication with the underlying transaction manager has failed.”

Solution
I think the accepted answer fixed the initial issue I was getting. The 2nd error seems to be specific to Entity Framework. I’ll post another question for it.

Here are the properties on the client:
Client http://www.portnine.com/data/images/Misc/client.jpg

Here are the properties on the server:
Server http://www.portnine.com/data/images/Misc/server.jpg

  • 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-11T16:16:57+00:00Added an answer on May 11, 2026 at 4:16 pm

    You need to enable network DTC access as described in this Microsoft TechNet Article. This change may have to be made on both the database and application servers. Often times DTC is already turned on a database server so I’d look at the application server first.

    Here is a screen shot of what we use except for the “Allow Remote Administration” option:
    Security Configuration Screenshot

    I have not run into the HRESULT E_Fail issue you are now having but this article on XP SP2 and transactions had this interesting suggestion:

    Another configuration setting that you
    need to be aware (although I consider
    it to be an uncommon scenario) is
    RestrictRemoteClients registry key. If
    the value of this key is set to 2
    (RPC_RESTRICT_REMOTE_CLIENT_HIGH) then
    MSDTC network transactions will not be
    able to work properly. MSDTC supports
    only RPC_RESTRICT_REMOTE_CLIENT_NONE
    (0) and
    RPC_RESTRICT_REMOTE_CLIENT_DEFAULT (1)
    values. See
    http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2netwk.mspx#XSLTsection128121120120
    for more info on
    RestrictRemoteClients.

    Finally, while not specific to your issue a very important thing to note about using the TransactionScope class is that its default setting is to utilize a Transaction Isolation Level of Serializable. Serializable is the most restrictive of the isolation levels and frankly its surprising that it was chosen as the default. If you do not need this level of locking I would highly recommend setting the isolation level to a less restrictive option (ReadCommitted) when instantiating a TransactionScope:

    var scopeOptions = new TransactionOptions();
    scopeOptions.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
    scopeOptions.Timeout = TimeSpan.MaxValue;
    
    using (var scope = new TransactionScope(TransactionScopeOption.Required,
        scopeOptions))
    {
        // your code here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 112k
  • Answers 112k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Assuming that Set s1 contains the same contents in the… May 11, 2026 at 9:58 pm
  • Editorial Team
    Editorial Team added an answer The built-in localization system of the .NET framework already handles… May 11, 2026 at 9:58 pm
  • Editorial Team
    Editorial Team added an answer User Controls are controls built with a designer within a… May 11, 2026 at 9:58 pm

Related Questions

I have a service level methods, which make few changes to database and I
I am trying to use MinGW to compile a C program under Windows XP.
I am trying to use a stringstream object in VC++ (VStudio 2003) butI am
I am trying to use the InternalsVisibleTo assembly attribute to make my internal classes
I am trying to use forms authentication with Active Directory but I need roles

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.