Library tutorials & articles
Overview of Automated Transactions
Two or more .NET Framework objects can participate in the same transaction. One or more .NET Framework objects can participate in the same transaction as one or more COM+ objects. All objects must be hosted in Microsoft Windows 2K Component Services so as to receive services such as transaction processing.
There are several considerations you must address in designing transactions that span COM+ and .NET Framework objects. For example, in order for a .NET Framework object to participate in an automatic transaction, the .NET Framework class must be registered with Window 2K Component Services. However, not all transactions are automatic. The activities you perform when programming transactions depend on the transaction model you choose.
Microsoft Transaction Server (MTS), COM+, and the Common Language Runtime support the same automatic, distributed transaction model.
Once an ASP.NET page, WebMethod, or .NET Framework class is marked to participate in a transaction, it will automatically execute within the scope of a transaction. You can control an object's transactional behavior by setting a transaction attribute value on the page, WebMethod, or class. The attribute value, in turn, determines the transactional behavior of the instantiated object.
Thus, based on the declared attribute value, an object will automatically participate in an existing or ongoing transaction, be the root of a new transaction, or never participate in a transaction at all .The ASP.NET framework supports automatic transactions on Windows 2K . By inserting a transaction directive in your ASP.NET page, you can instruct the page to participate in an existing transaction, begin a new transaction, or never participate in a transaction.
The table below lists and describes the transaction directives available in ASP.NET.
| Directive | Description |
NotSupported
|
This value indicates that the page does not run within the scope of transactions. When a request is processed, its object context is created without a transaction, regardless of whether there is a transaction active. |
Supported
|
The page will run in the context of an existing transaction, if one exists. If not, it will run without a transaction. |
Required
|
The page requires a transaction. It will run in the context of an existing transaction, if one exists. If not, it will start one. |
RequiresNew
|
The page requires a transaction and a new transaction will be started for each request. |
You can indicate the level of transaction support on a page by placing the directive in your code. For example, you can ensure that the page activities always execute in the scope of a transaction by inserting the following directive:
<%@ Page Transaction="Required" %>
The default transaction state is None, which indicates that the transaction context will be ignored by the ASP.NET framework.
There is no explicit directive for this value; in other words, you cannot add page Transaction="None" to your page. Instead, simply omit the transaction directive to apply the default value.
Related articles
Related discussion
-
Gizmox Announces release of Visual WebGui SDK version 6.2.2
by Visual WebGui (0 replies)
-
Error 4 Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).
by lbargers (3 replies)
-
How to receive data in web server sending from GPRS modem
by AshokSingh (1 replies)
-
Working with frames in c# .net
by pulak2008 (0 replies)
-
Time Out Problem
by lorrainepetty (1 replies)
Related podcasts
-
CodeCast Episode 4: State of .NET, IE8, ASP.NET MVC, and O'Reilly Media
CodeCast Episode 4: State of .NET, IE8, ASP.NET MVC, and O'Reilly MediaHosts Ken Levy and Markus Egger discuss the new State of .NET events, IE8, ASP.NET MVC, followed by an interview from PDC with two editors from O'Reilly Media. More on ASP.NET MVC can be found at http://asp.net/mvc. Interview...
Related jobs
-
Microsoft .Net Architect
in AMSTERDAM (€50K-€90K per annum) -
Microsoft Dynamics CRM Technical Consultant
in Netherlands (€50K-€90K per annum) -
.net developer
in Rijswijk (€2K-€4K per annum)
Events coming up
-
Dec
9
Internet Information Services 7.0 for ASP.Net Developers
Glasgow, United Kingdom
One of the biggest and best new features of Windows Server 2008 and Windows Vista is Internet Information Server 7.0. IIS 7.0 is the latest and most significant release of Microsoft's Web Server. With this release comes a new extensibility model which gives developers more options than ever before, more diagnostic tools with which developers can debug and locate issues. During the session Andrew will investigate the new architecture, look at extending, configuring and developing for IIS7, ta...
This thread is for discussions of Overview of Automated Transactions.