Hello,
I have downloaded code and i have proceed with below steps. database is created but empty and getting error on tenant creation.
- Added master connection string on web.config
- Run Update-Database command.
- Now application is working perfectly with default tenant.
- Then creating tenant and i am passing connection string with credential and without credential also getting same error.
Server={servername};Database={dbname};User ID=sa;Password={password}; Server={localhost};Database={dbname};Trusted_Connection=true;
I have try with above two connection string. database created successfully. but not creating tenant on tenants table in master database.
I have followed this document. <a class="postlink" href="http://volosoft.com/aspnet-boilerplate-v0-9-and-aspnet-zero-v1-10-have-been-released/">http://volosoft.com/aspnet-boilerplate- ... -released/</a>
Do you have any other document? step by step?
Error (Stack trace)
System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: MSDTC on server '{Server}' is unavailable.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest)
at System.Data.SqlClient.TdsParser.GetDTCAddress(Int32 timeout, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.GetDTCAddress()
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.PrepareConnection(DbConnection owningObject, DbConnectionInternal obj, Transaction transaction)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultip...
Awaiting for your answer.
Thanks
15 Answer(s)
-
0
Have you seen the blog post we published for this release: <a class="postlink" href="http://volosoft.com/aspnet-boilerplate-v0-9-and-aspnet-zero-v1-10-have-been-released/">http://volosoft.com/aspnet-boilerplate- ... -released/</a>
See the MSDTC section in the post:
ABP uses transaction for each unit of work as default. If our UOW includes more than one database operation, then it becomes a distributed transaction. As you know, this may require MSDTC (Microsoft Distributed Transaction Coordinator) be enabled and running on the server.
-
0
Hello Hikalkan,
Thank you for your quick response.
I got a step for enable MSDTC [https://technet.microsoft.com/en-us/library/cc759136%28v=ws.10%29.aspx]). but on last step they mention Hit the Security Configuration button in MSDTC tab. But in my windows 10 not available this option in MSDTC tab. please see attached.
Can you please suggest me how we can enable MSDTC when we are on local development.
Awaiting for your answer.
-
0
-
0
Dear ismcagdas,
As per hikalkan mention in documentation We have to enable MSDTC. not a DTC
And when we right click on the "Local DTC" then click properties. then in security tab showing Network DTC Access.
So may i know if i enable this option then Multi tenant – multi databases will work?
Find attached for reference.
Awaiting for your response.
-
0
-
0
Hello ismcagdas,
Yeah this service is already running on my system. Let me know the next step to resolve this issue.
-
0
Hi,
I'm asking just be sure,
Is your db server(s) and application server are same ? Because MSDTC must be enabled on all servers including app server and database server(s).
-
0
Hello ismcagdas,,
I am trying to run still on local system.. so yes my application is running on my visual studio and yeah sql server also on my same system.
Let me know the next step to resolve this issue.
Thanks
-
0
Hi,
This is actually a problem non related to AspNet Zero. In your exception message, I see:
"MSDTC on server '{Server}' is unavailable"
What is {Server} in your connection string? I suspect that it's '{Server}', otherwise the exception would include the actual server name instead of placeholder.
-
0
Hi Hikalkan,
Basically we can't explore personal detail on forums that's why i put {Server}, {dbname}, {Password} like that.
:)
-
0
to add to this I was able to make it work on my laptop where IIS and DB are on the same machine . The moment I moved it to our development server where IIS and DB are in different server I start getting the issue discussed here.
I tried all possible troubleshooting but still unable to resolve.
FYI : The firewall is disabled.
-
0
to add to it :
I was using SQL Server 2016 and Windows Srver 2016. Now I tested with a SQL 2012 and Windows Server 2012 and it works fine
-
0
Can you disable transactions to better understand if it's related to that. In your Core module's PreInitialize:
Configuration.UnitOfWork.IsTransactional = false;
-
0
Hello Hikalkan,
What is the solution for my issue?