Hi,
I'm trying to use inside a transaction scope the method
Roles.AddUserToRole(Username, UserRole)
but the DTC thows the exception:
"The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled
the distributed transaction.
Could not create constraint. See previous errors.".
Outside the TS it works fine. Is there any reason for which that method
should not work inside a transaction scope? Also I have noticed that in the
same execution context the method
MembershipUser newuser = Membership.CreateUser(Username, Password, Email);
fails or completes successful in a random way. Sometimes works, sometimes
the DTC throws again.
These methods were thought to be used inside a TS? Should I use them outside
TS ?
Bob Barrows - 22 Oct 2008 14:56 GMT
> Hi,
> I'm trying to use inside a transaction scope the method
> Roles.AddUserToRole(Username, UserRole)
There was no way for you to know it (except maybe by browsing through
some of the previous questions before posting yours - always a
recommended practice), but this is a classic (COM-based) asp newsgroup.
ASP.Net is a different technology from classic ASP. While you may be
lucky enough to find a dotnet-savvy person here who can answer your
question, you can eliminate the luck factor by posting your question to
a newsgroup where the dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.
There are also forums at www.asp.net where you can find a lot of people
to help you.
HTH,
Bob Barrows

Signature
HTH,
Bob Barrows
VictorP - 22 Oct 2008 15:31 GMT
Thank you Bob!
-Victor
> > Hi,
> > I'm trying to use inside a transaction scope the method
[quoted text clipped - 15 lines]
> HTH,
> Bob Barrows