Re: Handling Script Timeout when invoking ActiveX Object involving ADODB from ASP2.0 pages

From: Patrick (patl_at_reply.newsgroup.msn.com)
Date: 11/15/04


Date: Mon, 15 Nov 2004 11:42:29 -0000

More findings.
1) With the ASP file listed at the end of this post, If
1.1) I load the ASP on Server A, where Server A
1.1.1) contains the target DB as stated in connection string
1.1.2) running IIS6.0 on a Windows 2003 Server
1.1.3) Running SQL Server 2000 SP3a
Then, The ASP run successfully displaying "db openend" and "record updated"
1.2) If I load the ASP on a Windows XP Professional SP1 machine B
1.2.1) with the ASP containign the same target DB as stated in connection
string
1.2.1) Running windows XP Pro SP1, IIS5.1 on the same domain as the Windows
2003 server A
Then I get the following error:
ERROR-2147168246
New transaction cannot enlist in the specified transaction coordinator.

I have played around with the following (following the articles/newsgroup
posting you suggested)
1) MSDTC is definitely started
2) Machine pings OK
3) SQL Client is set to use TCP/IP only with Enabled shared memory unticked
4) Transaction timeout set to 80 seconds (although the error is returned
straight away!)
5) On Component services:
5.1) Default Properties Tab:
5.1.1) Ticked Enabled DCOM on this computer
5.1.2) Ticked enable COM Internet Services on this computer
5.1.2) Default Authentication level set to: Connect
5.1.3) Default Impersonation tried: Tried all 4 settings ( all results in
same error)
5.2) DCOM Security Tab
5.2.1) Ensure IWAM_MachineName and IUSR_MachineName has launch premission
5.3) MSDTC Tab
5.3.1) Ticked Network DTC Access, Network Administration, Network
Transacitons and XA Transaction
5.3.2) DTC Logon Account:
5.3.2.1) Set to LocalSystem
5.3.2.1) If I try to set to a Domain account that belongs to the Admin group
on both the WinXP Pro and windows 2003 server server, I get the following
logged:
Event Type: Error
Event Source: MSDTC Client
Event Category: MSDTC User Interface
Event ID: 4429
Date: 15/11/2004
Time: 09:37:56
User: N/A
Computer: WindXPPro
Description:
Failed to set the security attributes on the MS DTC service. Internal
Information : Pid = 2184, File:
d:\nt_qxp\com\com1x\dtc\dtc\dacdll\src\transcfgdlg.cpp, Line: 461,
ApplyAccountSettings failed, hr=0x8007007b

.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 7b 00 07 80 {..€

6) Note the MSDTC Trace files at %SYSTEMROOT%\system32\MsDtc\Trace are
pretty binary and meaningless to me!

7) Note I only get a problem with the ASP file if Transaction attribute is
set to Required or ReqruiesNews!

-----------------------------Start of
dbTimeout.asp-----------------------------
<%@ TRANSACTION=Required LANGUAGE="VBScript" %>
<%Response.Buffer = TRUE%>
   <HTML>
   <HEAD>
   <TITLE>Simple Transactional Web Page</TITLE>
   </HEAD>
   <BODY BGCOLOR="White" topmargin="10" leftmargin="10">
   <font size="4" face="Arial, Helvetica">
   <b>Transactional Web Page</b></font><br>
   <hr size="1" color="#000000">
   <p>
   This is an example of an Aborted Transaction.
   This transaction will abort due to a Script
   Time-out error, which is an error that you
   could not trap without a transaction.
   </p>
   <p>
   Please wait until the script times out...
   </p>

   <%

      if UCase(dbLocked) = "Y" then
  'call errorDB("<b>" & langErrStoreClosed & "</b>","")
  %>database locked<%
 end if
 on error resume next
 set connTemp = server.createobject("adodb.connection")
 connTemp.Open connString
 if err.number <> 0 then

  %><h1>ERROR<%=err.Number%><br><%=err.Description %></h1><%
  Response.End
 end if
 %><b>DB Opened</b><br><%

      mySQL = "UPDATE cartHead SET zip = 'E' WHERE idCust=91414"
 set rsTemp = conntemp.execute(mySQL)
 if err.number <> 0 then
  %><h1>ERROR<%=err.Number%><br><%=err.Description %></h1><%
  Response.End
 end if
 call closeRS(rsTemp)

 %><b>record updated</b><%
 closeDB()
 'Do while 1 = 1
       'Infinite Loop
     'Loop
   %>
   </BODY>
   </HTML>
   <%
    ' The Transacted Script Abort Handler. This sub-routine
    ' will be called if the script transacted aborts

     Sub OnTransactionAbort()
Response.Write "&lt;p&gt;&lt;b&gt;The Transaction just aborted&lt;/b&gt;."
       Response.Write "This message came from the "
       Response.Write "OnTransactionAbort() event handler."
     end sub

'*************************************************************************
'Declare some standard ADO variables
'*************************************************************************
Const adOpenKeyset = 1
Const adOpenStatic = 3
Const adLockReadOnly = 1
Const adLockOptimistic = 3
Const adStateClosed = &H00000000
Const adUseServer = 2
Const adUseClient = 3
Const adCmdText = &H0001
Const adCmdTable = &H0002
const connString = "Provider=SQLOLEDB.1;Password=publications;Persist
Security Info=True;User ID=publications;Initial Catalog=Publications;Data
Source=dev"

%>

-----------------------------End of
dbTimeout.asp-----------------------------

"Kevin Yu [MSFT]" <v-kevy@online.microsoft.com> wrote in message
news:v0zkSzVyEHA.3388@cpmsftngxa10.phx.gbl...
> Hi Patrick,
>
> First of all, I would like to confirm my understanding of your issue. From
> your description, I understand that you're getting an error -2147168246
> "New transaction cannot enlist in the specified transaction coordinator."
> when trying to open a recordset from a connection. If there is any
> misunderstanding, please feel free to let me know.
>
> Based on my research, you can try the following KB article for
> troubleshooting:
>
> http://support.microsoft.com/default.aspx?scid=KB;EN-US;191168
>
> If that still doesn't work, could you let me know if your machine is in a
> domain or a workgroup environment? You can try some resolution from the
> following thread:
>
>
http://groups.google.com/groups?hl=zh-CN&lr=&threadm=u%23eGFzonDHA.1072%40TK
>
2MSFTNGP09.phx.gbl&rnum=1&prev=/groups%3Fq%3D2147168246%2B%2522New%2Btransac
>
tion%2Bcannot%2Benlist%2Bin%2Bthe%2Bspecified%2Btransaction%2Bcoordinator%25
>
22%26hl%3Dzh-CN%26lr%3D%26selm%3Du%2523eGFzonDHA.1072%2540TK2MSFTNGP09.phx.g
> bl%26rnum%3D1
>
> HTH.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."



Relevant Pages

  • Re: Handling Script Timeout when invoking ActiveX Object involving ADODB from ASP2.0 pages
    ... The problem is completely unrelated to Interop. ... Problem only occur when Transactional attribute of ASP page is set to ... This is an example of an Aborted Transaction. ... Const adOpenKeyset = 1 ...
    (microsoft.public.inetserver.asp.general)
  • Re: Help with Master/Detail UI in ADPs
    ... Yes I would plan on dropping DAO use in adps. ... The link about recordsets is quite informative. ... is more native to the way the ADP will access the SQL Server data. ... very tight control of the transaction, ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Help with Master/Detail UI in ADPs
    ... I would look into dropping all DAO code in favor of ADO. ... is more native to the way the ADP will access the SQL Server data. ... very tight control of the transaction, ... bind it to the Detail subform. ...
    (microsoft.public.access.adp.sqlserver)
  • [3/3] POHMELFS: core files.
    ... new file mode 100644 ... Each transaction contains all information needed to process given command ... +system and put data where it belongs (like page or inode cache). ... are asynchronous and are sent to the server during system writeback. ...
    (Linux-Kernel)
  • Re: Using MARS with JDBC Driver
    ... > was blocked on the SELECT by another transaction that was blocked on the ... You mentioned something about server side cursor not scaling the way you ... > deadlocks. ... > may occur after acquiring an UPDATE lock, because we know that we have ...
    (microsoft.public.sqlserver.jdbcdriver)