Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / October 2008



Tip: Looking for answers? Try searching our database.

Roles.AddUserToRole(Username, UserRole) in transactions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
VictorP - 22 Oct 2008 12:51 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.