One of my projects was working properly, and then I shifted it into another pc, now same code, throws the below error for some SQL queries.
SqlException: MSDTC on server is unavailable.
It was working on the last PC without any issue, so I am not sure what's the error
I am using Entity framework in my C#, ASP.NET MVC project.
I am not posting any code, as Code is simple just updating data in the database in the background using HangfireIO.
As explained in your question description that code was working in older pc and now getting error " SqlException: MSDTC on server is unavailable"
Here is the possible solution for it.
When SQL Server and the Application Server are on different boxes
The above 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
This should resolve your issue permanently.
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly