Not so long ago, I had to separate the web application server and the SQL server (a separate machine was started, to which the SQL server was transferred), but it was not possible to start everything right away.
To group the teams in a transaction, the code uses
TransactionScope . However, when the client application (in my case ASP.NET) and MS SQL server are on different computers, using TransactionScope results in the following error.
For transactions / remote transactions / network transactions.Locally all set up. But since the procedure will have to be repeated when deploying on a live server, as well as when moving, I decided to write a small instruction for myself. When finished, I thought that maybe someone else would come in handy.
')
Immediately I will say the following bunch works for me
Vista Client PC
Windows Server 2008 + SQL Server 2008 - server.
If you have other combinations, then some screens on your screenshots will look different.
So, in order for everything to work, you need to configure the Distributed Transaction Coordinator on the computer with MS SQL Server and on the client computer.
Server Tuning1. Ensure that the Distributed Transaction Coordinator service is running.

2. Configure Distributed Transaction Coordinator (DTC)
For this
- Execute the 'dcomcnfg' command
- Next Computers-> My Computer-> Distributed Transaction Coordinator
- On LocalDTC, right click and select Properties
- Go to the Security tab on it and put a tick on the Network DTC Access , Allow Remote Clients , Allow Inbound , Allow Outbound .

After that, the service will restart.
3. You must add an exception to the Windows Firewall for Distributed Transaction Coordinator

4. After that, restart the SQL Server service.
In any case, it is better to reboot the server altogether, although I had to restart SQL Server.
Client setup1. It is also necessary to make sure that the DTC service is running.
2. Execute 'dcomcnfg', go to the same properties as on the server and set the checkboxes
- Network DTC Access
- Allow Inbound
- Allow outbound

3. Add Exceptions to Windows Firewall

After these steps, everything worked.
More details about the appointment of all options can be read
here .
Thanks for attention.