A Microsoft® Transaction Server (MTS) transaction is a unit of work that is performed as an atomic operation. In the Active Server Pages (ASP) environment, transactions occur on a per-page level. To mark an ASP as one that requires a transaction, you include the following script at the top of the page:
<%@ LANGUAGE=VBScript Transaction=Required%>
When you mark a page as transacted, all of the work that occurs on that page becomes part of the same transaction context. The objects that are created on the page, and the work performed by those objects, become part of that transaction context, provided that those objects are registered on the server system as MTS components. In the event of an error, the work performed by those objects can be rolled back, and the objects rendered stateless.
Suppose, for example, that you create a page that includes an object that uses the Active Data Objects (ADO) to insert or update data in a database. In the event that this component fails, you can call the MTS ObjectContext object’s SetAbort method to abort the transaction in which that object participates, and all of the modifications made by the object to the database are rolled back.
Neither SMTP nor HTTP are transacted protocols. Therefore, an MTS-based transaction cannot pass over these protocols. A CIP that uses the SendSMTP or SendHTTP components can create transactions that span the transmit side and the receive side respectively, but that do not span the Internet protocol used. Instead, there is one transaction context on the transmit side and another transaction context on the receive side. DCOM, however, is a protocol that supports MTS, and thus a single transaction context can span both the transmit and receive sides of the CIP.