Microsoft KB Archive/248403

From BetaArchive Wiki

Article ID: 248403

Article Last Modified on 12/13/2004



APPLIES TO

  • Microsoft Site Server 3.0 Commerce Edition



This article was previously published under Q248403

SYMPTOMS

If shoppers are unable to complete purchases from your Site Server 3.0 Commerce Server Store, the following error may be displayed in the shopper's browser when they attempt to complete a purchase:

Commerce.MtsTxPipeline error '8004d00a' [STORE NAME]Component Execution failed for component[0x3] hr: 0x8004D00A ProgID: Commerce.SaveReceipt.1 The operation requested by the application is not allowed if the object is closed. [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'MACHINE NAME' is unavailable. /store/include/util.asp, line 126

Additionally, the following errors may appear in the application log on the Internet Information Server (IIS) computer running Microsoft Site Server version 3.0, Commerce Edition:

Event ID: 12293
The description for Event ID ( 12293 ) in Source ( Microsoft Site Server 3.0 ) could not be found. It contains the following insertion string(s): [STORE NAME]Component Execution failed for component[0x3] hr: 0x8004D00A ProgID: Commerce.SaveReceipt.1 The operation requested by the application is not allowed if the object is closed. [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'MACHINE NAME' is unavailable.

Event ID: 12293
The description for Event ID ( 12293 ) in Source ( Microsoft Site Server 3.0 ) could not be found. It contains the following insertion string(s): Error loading the pipeline configuration data from the file: C:\Inetpub\wwwroot\store\config\purchase.pcf SQLItemAdo -- {1D265C80-77B2-11D0-8D58-00C04FD7A111} Server execution failed

Event ID: 12293
Commerce Server:
Connection Error:
Event ID: 0
The description for Event ID ( 0 ) in Source ( COM Contexts ) could not be found. It contains the following insertion string(s): Failed to enlist in DTC: SQL state 25S12, native error -2147168242, error message [Microsoft][ODBC SQL Server Driver]Distributed transaction error.

CAUSE

The errors listed in the "Symptoms" section typically indicate a problem running a Commerce Server pipeline component under the context of the Commerce.MtsTxPipeline package. The Commerce.MtsTxPipeline package has the option Requires a transaction enabled so if this package cannot enlist in a transaction, the pipeline component fails.

To test whether the Commerce Server pipeline component is failing as a result of a Transaction Server failure, run the failing Commerce Server pipeline component non-transacted.

To run the Commerce Server Pipeline Component non-transacted, open the Util.asp file or i_util.asp file in your Commerce Store and locate the following function:

function UtilRunTxPipe(file, orderForm, pipeContext) set pipeline = Server.CreateObject("Commerce.MtsTxPipeline")
                

Change this function so that it calls the Commerce.MtsPipeline package (which does not require a transaction) as follows:

function UtilRunTxPipe(file, orderForm, pipeContext) set pipeline = Server.CreateObject("Commerce.MtsPipeline")
                

If customers are now able to complete a purchase then the pipeline component was failing because the Commerce.MtsTxPipeline Transaction Server package cannot enlist in a transaction.

RESOLUTION

The following steps list some methods for troubleshooting failures in the Commerce.MtsTxPipeline Transaction Server Package.

  1. Follow steps 1 through 4 outlined in:

    191168 Error "-2147168246 (8004d00a)" failed to enlist on calling object's transaction

    If connecting to an Oracle database, follow all steps outlined in Q191168.

    Distributed Transaction Coordinator failures as described in Q191168, are commonly caused by NetBios name resolution failures. DTC communications require NetBios name resolution in both directions. To correct a NetBios name resolution failure, create a HOSTS file entry on the IIS Web Server that points to the SQL Server NetBios name, and also create a HOSTS file entry on the SQL Server that points to the IIS Web Server NetBios name

    A sample entry in the HOSTS file is similar to the following:

    10.57.51.10 <tab> <SQL Server NetBIOS name>

    When saving changes to the HOSTS file, ensure that it is saved with *no* file extension, otherwise the TCPIP stack will not read the HOSTS file when attempting name resolution.
  2. Make sure that the IIS Web Server and the SQL Server are using the same version of the Microsoft Distributed Transaction Coordinator (MSDTC). The version of the MSDTC can be determined as follows:

    On Windows NT 4:
    • Run the MSDTC Admin Console by clicking Start, and then Run.
    • Type DAC and select the General tab.

    On Windows 2000:

    • Open the Component Services snap-in.
    • Right-click My Computer.
    • Click Properties, and then select the MSDTC tab.

    Make sure that both computers are using the latest version of the MSDTC. The most recent version for NT 4 can be downloaded from the following Microsoft Web site:

  3. Reinitialize the MSDTC Log file. On a busy server, consider increasing the log size. MSDTC Log File settings can be accessed as follows:

    On Windows NT 4:
    • Run the MS DTC Admin Console by clicking Start, and then Run.
    • Type DAC and select the Advanced tab.

    On Windows 2000:

    • Open the Component Services snap-in.
    • Right-click My Computer.
    • Click Properties, and then select the MSDTC tab.
  4. Run DCOMCNFG by clicking Start, Run, and then selecting the Default Security tab. Edit the Default Access Permissions.

    NOTE: By default, the local administrators group may not be in the Default Access Permissions. If it is not there, add it.
  5. Change the Identity of the System package to a valid account, preferably one that is listed in the local administrators group.

    On Windows NT 4.0:
    • Open the NTOP MMC, select Transaction Server, Computers, My Computer, and then Packages Installed.
    • Right-click the System package and select Properties.
    • Select the Identity tab. If the default identity is set to Interactive user (whoever is currently logged on), change this to a valid account, preferably one in the local administrators group.

    On Windows 2000:

    • Open the Component Services snap-in, go to Start, Programs, Administrative Tools, and Component Services.
    • Then select Computers, My Computer, and COM+ Applications.
    • Right-click the CommercePipeline package and select Properties.
    • Select the Activation tab, select Server Application, and click OK to the warning dialog box that is displayed.
    • Select the Identity tab. If the default identity is set to Interactive user (whoever is currently logged on), change this to a valid account, preferably one in the local administrators group.
  6. If the Web server is multihomed, consider changing the binding order of the Web server network interface cards (NICs) so that the NIC that is on the same network as the database server is first in the binding order.

    To change the NIC binding order on Windows NT 4:
    • Go to Control Panel, click Network.
    • On the Bindings tab, show bindings for all protocols and move the NIC that is on the same network as the database up with the Move Up button.

    To change the NIC binding order on Windows 2000:

    • Right-click My Network Places, and click Properties.
    • On the Advanced menu, click Advanced Settings.
    • Under Connections, move the NIC that is on the same network as the database server up with the up arrow to the right of the Connections box.
  7. Are IIS and/or SQL on a cluster? Cluster changes DTC's behavior. Test name resolution BETWEEN servers *within* the cluster.
  8. For information on changing SQL Server 6.5's priority boost if using SQL 6.5 see the following knowledge base article:

    229019 12293 connection errors occur when SQL Server priority boost is changed

  9. Use RPCPing to test RPC connectivity between IIS and SQL, see the following knowledge base article:

    167260 How to use RPCPing to test RPC communication

    If RPCPing fails in either direction:

    • Is there a firewall between the Web server and the SQL Server? This may disrupt RPC Communication which is required by MSDTC. Check for the proper procedure for configuring DCOM/RPC through a firewall:
    • Since RPC connections are authenticated, check for PDC/BDC availability. Is a PDC/BDC "local" to both the IIS *and* SQL server? Or, does either server have to contact a PDC/BDC across a slow LAN/WAN link?
    • If RPC communications are still failing, it may be necessary to obtain a sniff trace of the network traffic between the IIS Web Server and the SQL server. See the following knowledge base article for instructions on using the Network Monitor:

      148942 How to capture network traffic with Network Monitor

  10. Paste the following script into Notepad and save as Default.asp. Place Default.asp into a virtual directory on an IIS web server and navigate to Default.asp from a browser. This script assumes that you have a DSN on the IIS server called pubs pointing to the pubs database, username sa and no password. This script tests your IIS Server's ability to make a transacted database call with ADO. If this fails, then the problem is MTS specific, not Commerce Server specific.

    <%@ TRANSACTION = Required %>
    <% Response.Buffer = True %>
    
    <%
        REM -- Constants
    
        REM -- ADO command types
        adCmdText       = 1 
        adCmdTable      = 2 
        adCmdStoredProc = 4
        adCmdUnknown    = 8
    
        REM -- ADO cursor types
        adOpenForwardOnly = 0
        adOpenKeyset      = 1
        adOpenDynamic     = 2
        adOpenStatic      = 3
    
        REM -- ADO lock types
        adLockReadOnly        = 1
        adLockPessimistic     = 2
        adLockOptimistic      = 3
        adLockBatchOptimistic = 4
    
        REM -- Create ADO Connection and Command Objects
        Set conn = Server.CreateObject("ADODB.Connection")
        Response.Write "Connection Created.<br>"
    
        conn.Open "DSN=pubs;UID=sa;PWD=;"
        Response.Write "Connection Opened.<br>"
        
        Set cmdTemp = Server.CreateObject("ADODB.Command")
        Response.Write "Command Created.<br>"
        
        cmdTemp.CommandType = adCmdText
        Set cmdTemp.ActiveConnection = conn
        cmdTemp.CommandText = "select * from authors where au_id = '172-32-1176'"
        Response.Write "Command Initialize.<br>"
        
        set rs = Server.CreateObject("ADODB.Recordset")
        Response.Write "Recordset Created.<br>"
        
        rs.open cmdTemp
        Response.Write "Recordset Opened.<br>"
    
        lname = rs("au_lname")
        
        rs.Close 
        set rs = nothing
        Response.Write "Recordset Closed and Released.<br>"
        
        set cmdTemp = nothing
        Response.Write "Command Released.<br>"
        
        if lname = "White" then
            conn.execute "update authors set au_lname = 'Black' where au_id = '172-32-1176'"
        else
            conn.execute "update authors set au_lname = 'White' where au_id = '172-32-1176'"
        end if   
        
        conn.Close 
        set conn = nothing 
        Response.Write "Connection Closed and Released.<br>"
    
        ' Display this page if the transaction succeeds.
        Sub OnTransactionCommit()
            Response.Write "<HTML>"  
            Response.Write "<BODY>"
            Response.Write "Transaction completed. Name was changed."
            Response.Write "</BODY>"  
            Response.Write "</HTML>"  
            Response.Flush()
        end sub
    
        ' Display this page if the transaction fails.
        Sub OnTransactionAbort()
            Response.Clear()  
            Response.Write "<HTML>"  
            Response.Write "<BODY>"
            Response.Write "Unable to complete your transaction."
            Response.Write "</BODY>"  
            Response.Write "</HTML>"  
            Response.Flush()
        End sub
    %>
                        


MORE INFORMATION

Steps to Reproduce the Behavior

  1. If the SQL Server that stores the Commerce Server tables is not on the same box as the Commerce Server, stop the MSDTC Service on the SQL Server.
  2. Attempt to complete a purchase from one of the sample stores on the Commerce Server.


Keywords: kbprb KB248403