Error 1219 After WNetCancelConnection2 (245006)



The information in this article applies to:

  • Microsoft Windows NT Server 4.0 Terminal Server Edition

This article was previously published under Q245006

SYMPTOMS

A developer may use the WNetAddConnection2 function to connect to a shared resource with a user context that is different from the context of the logged-on user. WNetCancelConnection2 is the recommended function for disconnecting resources that were connected by using WNetAddConnection2. WNetCancelConnection2 closes all files and disconnects the session from the remote server.

A program may connect to a shared resource sequentially by using two or more different user accounts. Because of a problem in the WNetCancelConnection2 function on Windows Terminal Server, the following error message may be received when you are attempting to connect to the resource in the context of the second user:
System error 1219 has occurred. The credentials supplied conflict with an existing set of credentials.

CAUSE

Even though WNetCancelConnection2 returns success, a file handle is left open that has a security entry of the first user. The next time any resource on the server is accessed from that terminal session, the system finds the old handle with a different user context, which is not valid, and generates the credential conflict error message.

RESOLUTION

Service pack information

To resolve this problem, obtain the latest service pack for Microsoft Windows NT 4.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

152734 How to obtain the latest Windows NT 4.0 service pack

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Microsoft Windows NT 4.0 Terminal Server Edition Service Pack 6.

Modification Type:MinorLast Reviewed:9/26/2005
Keywords:kbHotfixServer kbQFE kbbug kbfix kbQFE KB245006