0

Either DotNetNuke UserController.GetUser(PortalId,UserId,false) or UserController.ValidateUser(...) inside TransactionScope is causing TransactionAbortedException and the innerException is TransactionPromotionException. The symptoms are the same as this.

Could anyone suggest me the solution to this issue? Thanks a lot !

using (System.Transactions.TransactionScope ts = new System.Transactions.TransactionScope())
    {
        DotNetNuke.Entities.Users.UserInfo ui = DotNetNuke.Entities.Users.UserController.GetUser(PortalId, UserId, false);         
        ts.Complete();
    }
Community
  • 1
  • 1
Thurein
  • 2,536
  • 7
  • 34
  • 49

1 Answers1

0

By default DotNetNuke uses the ASP.NET 2.0 membership provider. As you pointed, Membership.GetUser() opens another database connection, which causes the exception inside TransactionScope.

If you want to use GetUser() inside TransactionScope, you'll either have to enable MSDTC or use SQL Server 2008. SQL 2008 allows multiple connections within a single TransactionScope, if the connections are to the same DBMS and are not open at the same time.

See Also:

TransactionScope automatically escalating to MSDTC on some machines?

Community
  • 1
  • 1
mika
  • 6,812
  • 4
  • 35
  • 38