
DCOM: error 1312 on WNetAddConnection2
One of my colleagues is working on a project using DCOM servers that
require access to network drives on other NT servers. Due to company
security policies the drive mappings must be re-made and closed each
time rather than using a permanently mapped drive [which would require
somebody to be logged in on the server at all times].
When using a simple VB5 test harness without DCOM, he can get
successful connection and disconnection from the server using the
WNetAddConnection2 and WNetCancelConnection2 methods respectively.
However when calling the same methods from within a VB5 developed DCOM
server, the error code 1312 is returned by WNetAddConnections2. The
description for error 1312 is:
"A specified logon session does not exist. It may already have been
terminated."
The parameters being passed into the WNetAddConnection2 method are:
unc = \\<server>\sharename
user = Administrator
drive = Z:
password = <local admin password>
The share on the server has been set up to grant "everyone" group
access and the DCOM servers have been configured to run as the local
administrator of the NT server hosting them.
Has anyone encountered this problem before and/or know of a solution or
workaround?
Thanks in advance.
alan
Sent via Deja.com http://www.*-*-*.com/
Before you buy.