Microsoft KB Archive/181697

From BetaArchive Wiki
Knowledge Base


Article ID: 181697

Article Last Modified on 10/28/2006



APPLIES TO

  • Microsoft Collaboration Data Objects 1.2 for NT Server



This article was previously published under Q181697

SYMPTOMS

When you use Collaboration Data Objects for Microsoft Windows NT Server (CDONTS) to send a large number of messages using multiple threads, the Send method may return the following Windows NT error code:

Code: 32L
Name: ERROR_SHARING_VIOLATION
Description: The process cannot access the file because it is being used by another process.

Note that the Windows NT error code may be displayed as 80040020, 80070020, or another similar number.

In addition, one or more messages may not be sent. These problems can occur when you use the Send method with the CDONTS NewMail object or Message object. To work around this problem, use a critical section to serialize calls to the Send method.

CAUSE

When you use CDONTS to send messages, the messages are converted to files. These files are stored in a folder until they are transferred using the Simple Mail Transfer Protocol (SMTP). The names of these files are based on the current system time. If more than one message is sent during the same clock cycle, both files are given the same name. When this occurs, the Send method returns the error code described above.

When you use CDONTS to send a large number of messages using multiple threads, it is more likely that multiple messages will be sent during the same clock cycle. This behavior is commonly observed with ASP pages.

Under certain circumstances, creating multiple files with the same name may cause one or more messages to be overwritten. When this occurs, the messages that are overwritten are not delivered.

RESOLUTION

To resolve this problem, obtain the latest service pack for Exchange Server version 5.5. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

191014 XGEN: How to Obtain the Latest Exchange Server 5.5 Service Pack


The English version of this fix should have the following file attributes or later:

Component: CDONTS

File name Version
Cdonts.dll 5.5.1877.28



STATUS

Microsoft has confirmed that this is a problem in Collaboration Data Objects for NTS version 1.2. This problem was first corrected in Exchange Server 5.5 Service Pack 3.

MORE INFORMATION

After you apply the fix, CDONTS uses a more robust file naming algorithm that prevents it from creating more than one file with the same name.

Keywords: kbbug kberrmsg kbfix KB181697