When I run on my hosted SQL server and localhost from Visual Studio 2017 i got error see below I can change password but but never log in. If I use the same database local everything works good!
Im running v2.x on my hosted SQL Server 2016 and Webb server and that work well Any suggestions?
System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Transactions.TransactionManagerCommunicationException: 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. ---> System.Runtime.InteropServices.COMException: Transaktionshanteraren har inaktiverat sitt stöd för fjärr- och nätverkstransaktioner. (Exception from HRESULT: 0x8004D024)
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.Oletx.OletxTransactionManager.ProxyException(COMException comException)
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.Sq...
4 Answer(s)
-
0
Hi @Hakan,
First, be sure to connect remote sql server from your computer. Try to connect sql server with 'sa' user, from project. Actually, this is completely about sql server configuration. Could you check this : <a class="postlink" href="https://stackoverflow.com/questions/5149591/network-access-for-distributed-transaction-manager-msdtc-has-been-disabled">https://stackoverflow.com/questions/514 ... n-disabled</a>
-
0
Hi @Hakan,
Is it possible that you are trying to operate on more than one database ? If so, you can either enable MSDTC on both db server and your machine.
Another alternative would be using DbContextEfTransactionStrategy, see <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/EntityFramework-Integration#transaction-management">https://aspnetboilerplate.com/Pages/Doc ... management</a>.
-
0
It works now, I used the Transaction Management, beacuse I couldnt change the MSDTC on my shared SQL server online
public class WebModule : AbpModule Configuration.ReplaceService<IEfTransactionStrategy, DbContextEfTransactionStrategy>(DependencyLifeStyle.Transient);
-
0
Thanks for the feedback @Hakan :)