Add Enlist=false in the connection string of your membership.
connectionString="Data Source=xxx;Initial Catalog=xxx;Persist Security Info=True;User ID=xxx;Password=xxx;Enlist=false"
This is my use case:
using (TransactionScope tScope = new TransactionScope()) { MembershipCreateStatus createStatus; Membership.CreateUser(model.Email, model.Password, model.Email, null, null, true, model.Id, out createStatus); if (createStatus == MembershipCreateStatus.Success) { Roles.AddUserToRole(model.Email, "Administrator"); _UpdatePersonnelAccess(model); _UpdatePersonnelHasAccess(model); _SendEmail_Welcome(model); PersonSessionLog.ManageSession(model); } else ViewBag.Message = "Error"; tScope.Complete(); }
My application is published on Amazon EC2, and the database is on Amazon RDS. DTC is not supported in RDS, so I also need a way to prevent the DTC from escalating. By the way, I am using SQL Server 2008 R2. I have 2 databases - ASPNETDB, data DB
Thanks Paul post !
source share