How to: Participate in Transactions in Web Services Created Using ASP.NET
For an XML Web service created using ASP.NET, you can declare the Web service's transactional behavior by setting the TransactionOption property of the WebMethod attribute applied to the Web service method. For an explanation of how transactions work for Web service methods, see .
To participate in a transaction from a Web service method
Declare a Web service.
Add an Assembly directive to System.EnterpriseServices.
<%@ Assembly name="System.EnterpriseServices,Version=1.0.3300.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" %>
Add references to theand namespaces.
Declare a Web service method, setting theproperty of the attribute to .
[ WebMethod(TransactionOption=TransactionOption.RequiresNew)] public int DeleteAuthor(string lastName)