How To Fix “MSDTC on server ‘server name’ is unavailable” Error[ASP.NET/SQL Server]

When I used the .NET TransactionScope object to control a transaction in a web page the following error message greeted me

————————————————————————————————————————

MSDTC on server ‘GopinathM’ is unavailable.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: MSDTC on server ‘GopinathM’ is unavailable.

————————————————————————————————————————

This error occurs when the “Distributed Transaction Coordinator” service is not running. To start a distributed transactions with TransactionScope object, the windows service “Distributed Transaction Coordinator” should be running.

To fix the problem just start the service “Distributed Transaction Coordinator” using Windows Service manager.

Here are the detailed steps for starting the service

  1. Click on Start–>Control Panel->Administrative Tools->Services (or simply type services.msc in the run command box and hit enter); display “Services” manager
  2. Scroll through the list and identify the service “Distributed Transaction Coordinator”
  3. Right on the service and choose “Start”

When SQL Server and the Application Server are on different boxes

The above said solution work well when SQL Server and the Application are on the same box. If they are deployed on different boxes then additionally you should follow these steps to correct the problem

  1. Click Start–>Control Panel –> Adminstrative Tools –> Component Services –> Computers
  2. Right click on My Computer and choose  Properties option
  3. Switch to MS DTC tab and check allow remote access

Repeat these steps on Application Server and Database server

6 thoughts on “How To Fix “MSDTC on server ‘server name’ is unavailable” Error[ASP.NET/SQL Server]”

  1. Thanx fro the tip.

    First Half worked,
    2nd half still not working (remote access to the sql server)
    Error Message:
    “The partner transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D025)”

  2. First on the list when I searched with Yahoo, and most importantly it worked!

    Thanks for your contributions, this saved me alot of time.

Leave a Reply to chris Cancel Reply

Your email address will not be published. Required fields are marked *