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 8046195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:43:42+00:00 2026-06-05T05:43:42+00:00

My ASP.NET MVC application is using Application Services for Membership. For a number of

  • 0

My ASP.NET MVC application is using Application Services for Membership. For a number of reasons I am not using the Application Services Profiles. I am managing profiles in a bunch of bespoke tables that are connected to the Membership tables.
My Domain Model consists of classes that map with Entity Framework (DbContext) to my tables (including profile tables but not the Application Services Tables).

When a new user is created by the membership provider, I want to do a bunch of things in my profile tables and rollback the membership creation if any of my profile preparation steps fails.

So I altered the registration method to include a call to the methods that do the work I want and placed it all in a TransactionScope. The code works fine when there is no Transaction, but using a TransactionScope, as soon as the context.SaveChanges() method is called from within the Repository Class (which is in a separate assembly), I get the error: “The provider did not return a ProviderManifestToken string.”

using (TransactionScope scope = new TransactionScope())
{
System.Web.Security.MembershipUser newUser = Membership.CreateUser
    (model.UserName, model.Password, model.Email, null, null, true, null, out createStatus);

if (createStatus == MembershipCreateStatus.Success)
{
    FormsAuthentication.SetAuthCookie(model.UserName, false /* createPersistentCookie */);

    // Create the profile and permissions
    bool profileCreation = repository.NewUser(newUser.UserName, newUser.ProviderUserKey);

    if (profileCreation)
    {
        scope.Complete();
        return RedirectToAction("List", "Project");
    }
    else scope.Dispose();
}
else
{
    scope.Dispose();
    ModelState.AddModelError("", ErrorCodeToString(createStatus));
}                    
}

Is it possible for transactions to handle connections to the database that are coming from Entity Framework and the Application Services code (I don’t know what connection method it uses)? If so, how do I achieve this?

I would be very grateful for any help,
Dave

  • 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-06-05T05:43:43+00:00Added an answer on June 5, 2026 at 5:43 am

    Thank you SilverNinja for the advice. The answer turned out to be quite simple:
    Turn on Distributed Transaction Coordinator (MSDTC) from the Services window.

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

Sidebar

Related Questions

I have an ASP.NET MVC application using Authorization Attributes on Controllers and Actions. This
I have a ASP.NET MVC application using NHibernate and the application runs fine when
I am new in Asp.net MVC.i have created mvc application using datasource but i
I've made some graphs in my ASP.Net MVC application using the ASP.Net MSChart control.
I am creating an editor in asp.net MVC application using ckeditor. In textarea i
I am uploading a file in my ASP.NET MVC application using Uploadify. Controller: public
I have an ASP.NET MVC 3 application using an Entity Framework (4.3.1) Code First
What are the licences required for an asp.net (MVC) web application using sql server
I am trying to integrate facebook with in my asp.net mvc web application using
In my ASP.NET MVC application i am using Chinese Category Name, it was displayed

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.