I have a C# application that uses the rasapi32.dll
to create a dial up connection. When I create such a connection under Windows 7, the credentials get stored in the credential manager
as an entry called *session
.
This *session
entry in the credential manager
causes existing connections to other resources (network shares, database connections) to become invalid. Is there a way to tell Windows not to store the credentials?
I already know a solution, but this disables storage of credentials for the whole system: Setting the registry value HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\DisableDomainCreds to 1
.
I would like to disable it only for my application.