Saturday, July 10, 2010

How can I wrap a transaction around Membership.CreateUser?

My real life experience (happened more than once):

* Junior programmer writes a site.
* During code review, I catch the missing transaction between user creation and profile creation (typically with a custom SqlProvider)
* We wrap everything in a DTC transaction.
* Nothing works on junior programmer's computer.
* Fix DTC on junior programmer's computer.
* Deploy to shared hosting environment.
* Nothing works in hosting environment.
* Argue for 4 hours with hosting company trying to fix their DTC.
* Remove transaction because site has to go online.
* Pray.

I don't really like membership anymore...

From:WeAsk.US

No comments:

Post a Comment