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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:26:57+00:00 2026-05-24T12:26:57+00:00

I have used TransactionScope in the past with desktop client applications to roll back

  • 0

I have used TransactionScope in the past with desktop client applications to roll back an incomplete multi-step transaction. That approach would seem unlikely to work in an Web application.

Can anyone suggest ways in which multiple steps, across several pages, can be ensured to roll back if the entire process is not completed? (their browser crashes or they close the browser in mid process for example)

Certainly, i could write to a temp table of some sort, then transfer the final record to the real table in a single transaction, but that runs the risk of race conditions. I’d like to begin a transaction, serve several pages, each page writing a piece of the transaction to the table(s), then completing the transaction with a commit, and if the transaction is not completed, then it is rolled back when the session ends.

Or am i not thinking the right way? Suggestions?

Since i’m using MVC 3, EF 4.1 and Ninject, i’m not sure how that will affect the solution, but i thought i’d include that information.

  • 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-24T12:26:57+00:00Added an answer on May 24, 2026 at 12:26 pm

    There is no database transaction / TransactionScope across several pages. Even trying to do something like that is terribly wrong.

    You have two options to solve the problem:

    • Use Session

      Store your data in session and persist it to the database only if user completes all of the steps, and confirms the save. This is definitely what you need.]

    • Use workflow foundation and long running transactions.

      Long running transactions are not database transactions – they are a completely custom solution where you must implement compensation (rollback of long running transactions) manually. You still have to detect somehow that your workflow should be compensated, but this is not necessary for your solution. It is for a solution where you need a “transaction” for multiple sessions.

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

Sidebar

Related Questions

We have used Shibboleth to authenticate users. It works great. The issue is that
I have used a plugin that uses prototype js, it's working fine but the
I have used auto complete textbox previously. That auto complete works only when i
Where can I reference TransactionScope? What is it used for? Where can I have
I have a block of code that runs within a TransactionScope and within this
I have used ASP.NET Web Services (.asmx) in the past. However, I have heard
I have some VB.NET code that creates a TransactionScope instance: LoggingUtility.LogDebug(UpdateCallTable, SatComCallDataImporter, About to
Is the TransactionScope can be used only for Database/ADO.NET related methods? Say, I have
I would like to mimic the Repository approach that is widely used in DDD
I have used a list view in view flipper, I want that when user

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.