PRB: Problems Sending Many Messages Using Multiple Threads

ID: Q181697


The information in this article applies to:
  • Collaboration Data Objects (CDO) for NTS, version 1.2


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.


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, please see the following article in the Microsoft Knowledge Base:

Q191014 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


WORKAROUND

To work around this problem, use a critical section to serialize calls to the Send method.


STATUS

Microsoft has confirmed this to be 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.

Additional query words:

Keywords : kberrmsg kbCDONTS kbGrpMsg
Version : WINDOWS:1.2
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: October 8, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.