Search code examples
c#.nettransactionscope

TransactionScope does not run on localhost


I am getting this error:

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.

Is there a way to run TransactionScope on localhost? I can run the thing on a server but in my local environment I get this error. Is there some settings we need to make so that we can use a TransactionScope?


Solution

  • you need to start the service in Windows.

    Start > Run. services.msc

    enter image description here

    UPDATE:

    Check your Component Services too;

    Control Panel > Administrative Tools > Component Services

    enter image description here