Windows 10 UNC network credential

Job ID: 37139816

Budget: $30 – $250 USD

My C# program disconnect all UNC first using "net use * /delete /y" then reconnect using "net use \\ipaddress\IPC$ password /user:xxx". From time to to time, the reconnect does not work and give the following error message: System error 1219 has occurred. Multiple connections to a server or shared resource by the same user.

It seems windows 10 saves network credential somewhere even when "net use" shows no connections and credential managers show no windows credentials saved. I tried to use the following WNetUSeConnection windows API to disconnect all connections but could not get it to work.

https://stackoverflow.com/questions/659013/accessing-a-shared-file-unc-from-a-remote-non-trusted-domain-with-credentials.

Need help who can make above work to disconnect all network credentials.