Article ID: 181697 - Last Review: October 28, 2006 - Revision: 1.3 FIX: Problems Sending Many Messages Using Multiple ThreadsThis 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. 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. RESOLUTIONTo 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
(http://support.microsoft.com/kb/191014/EN-US/
)
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 Collapse this table
STATUSMicrosoft 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.
| Article Translations
|

Back to the top
