1000 Point Question - VB.NET Transactions, COM+

Posted on 2004-11-25
Last Modified: 2010-04-23
Question by:platinumbay
    1 Comment
    LVL 16

    Accepted Solution

    You need to inherit your class from System.EnterpriseServices.ServicedComponent as well. Then I normally place Transaction(TransactionOption.Required) as an attribute at the top of the class, and I generally specify the COM+ application details in the AssemblyInfo file as:

    [assembly: ApplicationName("<<app name>>")]
    [assembly: ApplicationID("<<app guid>>")]

    Personally, I find the quickest way to generate a GUID to use is SELECT NEWID() in SQL Server, but there are other methods of course. Both the class files and the AssemblyInfo file will need a reference:

    Imports System.EnterpriseServices

    You might also want to check out the AutoCopmleteAttribute class - you can flag your methods with the [AutoComplete] attribute to have them automatically determine transaction outcome based on the detection of any errors.

    In answer to your question about both rolling back, it rather depends on how good your CRM is for the FileSystem. In theory, yes. I'd suggest trying it and seeing.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now