Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7002637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:57:15+00:00 2026-05-27T20:57:15+00:00

We are trying to integrate the System.Web.Providers membership management into a transaction using System.Transactions.TransactionScope

  • 0

We are trying to integrate the System.Web.Providers membership management into a transaction using System.Transactions.TransactionScope and keep getting the following error message:

The operation is not valid for the state of the transaction.

Wrapped up in an exception with the following, more confusing message:

The provider did not return a ProviderManifestToken string.

Before anyone asks, yes we have verified that the connection string is correct and the user we’re using to connect to the db has the proper permissions. If we take the attempt to call Membership.CreateUser() out of a TransactionScope block, it works. Put it in a TransactionScope and it fails.

There seems to be amazingly little information out there about the Universal Provider. Pretty much all you see are links to the NuGet page and Scott Hanselman’s blog post from June.

Does anyone out there know how to get System.Web.Providers to participate in a transaction?

Thanks.

Here’s the full stacktrace, in case it’s helpful:

System.Data.ProviderIncompatibleException was unhandled by user code
  Message=The provider did not return a ProviderManifestToken string.
  Source=System.Data.Entity
  StackTrace:
       at System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
       at System.Web.Providers.Entities.ModelHelper.GetStorageMetadata(String providerName, DbConnection connection, String ssdl)
       at System.Web.Providers.Entities.ModelHelper.CreateMetadataWorkspace(String providerName, DbConnection connection, String csdl, String ssdl, String msl)
       at System.Web.Providers.Entities.ModelHelper.CreateEntityConnection(ConnectionStringSettings setting, String csdl, String ssdl, String msl)
       at System.Web.Providers.Entities.ModelHelper.CreateMembershipEntities(ConnectionStringSettings setting)
       at System.Web.Providers.DefaultMembershipProvider.Membership_CreateUser(String applicationName, String userName, String password, String salt, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, DateTime& createDate, Boolean uniqueEmail, Int32 passwordFormat, Object& providerUserKey)
       at System.Web.Providers.DefaultMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status)
       at System.Web.Security.Membership.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status)
       at WcfLoginRegister.RegistrationService.RegisterUser(RegisterUserRequest request) in C:\Users\rmacgrogan\dev\pallas\parthenon\sandbox\FbEntityTypeTester\WcfLoginRegister\RegistrationService.svc.cs:line 43
       at SyncInvokeRegisterUser(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
       at     System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
  InnerException: System.Transactions.TransactionException
       Message=The operation is not valid for the state of the transaction.
       Source=System.Transactions
       StackTrace:
            at     System.Transactions.TransactionState.EnlistPromotableSinglePhase(InternalTransaction tx, IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Transaction atomicTransaction)
            at System.Transactions.Transaction.EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification promotableSinglePhaseNotification)
            at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)
            at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
            at System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction)
            at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)
            at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
            at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
            at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
            at System.Data.SqlClient.SqlConnection.Open()
            at System.Data.SqlClient.SqlProviderServices.UsingConnection(SqlConnection sqlConnection, Action`1 act)
            at System.Data.SqlClient.SqlProviderServices.UsingMasterConnection(SqlConnection sqlConnection, Action`1 act)
            at System.Data.SqlClient.SqlProviderServices.GetDbProviderManifestToken(DbConnection connection)
            at System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
   InnerException: 

Update

I did a simplified test to get better access to the real underlying error, and Bahri Gungor is correct that the underlying issue is that MSDTC is not enabled.

However, since I am trying to run this code in an Azure project and since Azure does not support distributed transactions, I am stuck using an ugly workaround. All membership writes must occur in a separate transaction, which is pretty unfortunate.

Thanks everyone for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:57:16+00:00Added an answer on May 27, 2026 at 8:57 pm

    I haven’t tried using TransactionScope with ASPNet Membership Services, however, anything that will open another transaction (even a second connection to the database) will automatically initialize an MSDTC transaction. If MSDTC is not configured on the machine (I assume your web server), the transaction cannot be created successfully.

    Under Administrative Tools, there is a management tool called Component Services (Control Panel -> System and Security -> Administrative Tools). Once the tool opens, you will see Component Services on the left hand side. Open Component Services -> Computers -> My Computer -> Distributed Transaction Coordinator -> Local DTC (right click and select Properties). Select the Security Tab.

    Make sure Transaction Manager Communication has both Allow Inbound and Allow Outbound checked. Network DTC access should also be checked. I can’t be any more specific about the other settings because your specific environment might require different settings for the other variables.

    I believe what is happening is that your access of the ASPNet Membership Services (which have its own SQL Server configuration) is promoting the transaction to a MSDTC transaction, and some setting (security or configuration of MSDTC) is preventing it from succeeding. You will find all sorts of MSDTC troubleshooting literature with a simple Google search (many of which are resolved on Stack Overflow). However, I would check your Component Services configuration first, and make sure you can execute a distributed transaction.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to integrate a Web scheduling appliance with my organization's calendar system, Oracle
I'm trying to integrate passport into my nodejs server using connect, but can't seem
I am trying to integrate 2 modules using Visual web developer Module1 contains the
I'm trying to integrate an accounting solution into a web app I am developing.
I'm trying to integrate an adaptive payments system to my codeigniter project on my
Hi I'm trying to integrate an LDAP search functionality into my app similar to
I'm using Visual Web Developer 2010 Express and SQL Server 2008 R2 Management Studio
I'm trying to figure out how should I integrate facebook login system in my
We are building an AbleCommerce 7 web store and trying to integrate it with
trying to integrate hibernate and spring ,I ran into this error SEVERE: Context initialization

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.