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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:05:29+00:00 2026-06-02T23:05:29+00:00

I am using MVC 3 with Entities, now I have used the below line

  • 0

I am using MVC 3 with Entities, now I have used the below line of codes from my controller

        using (var scope = new TransactionScope())
        {
            _myRepository.DeleteFM1(id);
            _myRepository.DeleteFM2(id, name);
            scope.Complete();
        }

and inside my DeleteFM2 method which happens to be my method defined in the Entity class is as follows :

    public void DeleteFM2(int id, string name)
    {
        var data= _repositoryMD.Fetch().Where(mColl => mColl.Col1 == id);

        if (data!= null)
        {
                //insert here is giving some error MSDTC error !
                // here I prepare a message using the '**data**'
                _repositoryHistory.Insert(name, message, "FM2", "Delete", dateTime);


                _repositoryMD.Attach(data);
                _repositoryMD.Delete(data);
                _repositoryMD.SaveChanges();
            }
        }
    }

and I have a seperate class where I have defined the Insert method as

   public bool Insert(string realName, string logMessage, string tableName, string changeType, DateTime dateTime)
    {
        var history = new History
        {
            ModifiedBy = realName,
            ChangeType = changeType,
            DateModified = dateTime,
            LogMessage = logMessage,
            TableName = tableName
        };

        _repositoryHistory.Add(history);
        _repositoryHistory.SaveChanges();

        return true;
    }

After inserting this line of code in the above method DeleteFM2

      _repositoryHistory.Insert(name, message, "FM2", "Delete", dateTime);

I am getting this error, without this line my code works just fine, I have used this line in all of my other methods too even where I there I had used Transaction Scope, but I still dont seem to understand the problem here. Please help. Thanks

The underlying provider failed on Open.

System.Transactions.TransactionManagerCommunicationException:
Communication with the underlying transaction manager has failed. —>
System.Runtime.InteropServices.COMException: The MSDTC transaction
manager was unable to pull the transaction from the source transaction
manager due to communication problems. Possible causes are: a firewall
is present and it doesn’t have an exception for the MSDTC process, the
two machines cannot find each other by their NetBIOS names, or the
support for network transactions is not enabled for one of the two
transaction managers. (Exception from HRESULT: 0x8004D02B) at
System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32
propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier,
Guid& transactionIdentifier, OletxTransactionIsolationLevel&
isolationLevel, ITransactionShim& transactionShim) at
System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[]
propagationToken) — End of inner exception stack trace — at
System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[]
propagationToken) at
System.Transactions.TransactionStatePSPEOperation.PSPEPromote(InternalTransaction
tx) at
System.Transactions.TransactionStateDelegatedBase.EnterState(InternalTransaction
tx) at
System.Transactions.EnlistableStates.Promote(InternalTransaction tx)
at System.Transactions.Transaction.Promote() at
System.Transactions.TransactionInterop.ConvertToOletxTransaction(Transaction
transaction) at
System.Transactions.TransactionInterop.GetExportCookie(Transaction
transaction, Byte[] whereabouts) at
System.Data.SqlClient.SqlInternalConnection.GetTransactionCookie(Transaction
transaction, Byte[] whereAbouts) at
System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction
tx) at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction
tx) at
System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction
transaction) at
System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction
transaction) at
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) at
System.Data.SqlClient.SqlConnection.Open() at
System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean
openCondition, DbConnection storeConnectionToOpen, DbConnection
originalConnection, String exceptionCode, String attemptedOperation,
Boolean& closeStoreConnectionOnFailure)

My FireWall settings

My FireWall settings

  • 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-06-02T23:05:38+00:00Added an answer on June 2, 2026 at 11:05 pm

    The error implies that MSDTC is either not running on the database server that contains the database which _repositoryHistory targets; or that there is a network issue preventing propagation of the transaction to that machine.

    Check that MSDTC is installed and running on the database server.

    Check whether Windows Firewall is running on the target server; if it is, check the firewall exclusions for MSDTC. This link helps with that: http://technet.microsoft.com/en-us/library/cc725913(v=ws.10).aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using sping3 mvc in my application. I have some entities which need
I'd like to implement MVC while using LINQ (specifically, LINQ-to-entities). The way I would
Im using MVC-Viewmodel, EF Model first on my project. I have a foreach loop
I'm using MVC. I copied the login form from the login page and inserted
I'm using MVC 1.0 and have created a RequireSSLAttribute (like the one in ASP.NET
I'm using MVC 2 with some Models from a LinqToSql project that I built.
I am using MVC. How do I delete all records from the database using
I am new to linq and asp.net mvc and right now i am developing
I'm building an ASP.NET MVC site using the ADO.NET Entity Framework. I have an
In ASP.NET MVC there is Model, View and Controller. MODEL represents entities which are

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.