WNetAddConnection3 not working with credentials

  • Thread starter Thread starter MayankAg
  • Start date Start date
M

MayankAg

Guest
Hi All,

Env: Server 2016 with SMB2 protocol

I am trying to map a network drive with the credentials as TEST/TEST:

Below is the command:

net use \\10.62.xxx.xxx\IPC$ TEST /USER:TEST

After mapping I need to connect to the shared resource pro grammatically for copying some data using WNetAddConnection3 API by giving credentials as arguments, for the first time it is successfully executing but from the second time onwards this is failing with the error code 1219.

But the same program is successfully working in Windows server 2008 with SMB1 protocol

But in current scenario(Win server 2016) while removing user credentials from WNetAddConnection3 API to connect to host, it is working fine in 2016 server. what are the functional and security implications if I do not provide credential to WNetAddConnection3 API.

Please suggest,

Thanks In Advance


Thanks & Regards, Mayank Agarwal

Continue reading...
 
Back
Top