I am using SharpSvn library.
I am developing a tool with a lock functionality. To simulate different lock owners, I like to use other credentials. Unfortunately my code does not work. It looks like SharpSvn does not take into account the provided network credential. When I provide an incorrect one (e.g. bad password) it does not throw an exception.
Any ideas to fix my issue?
using (var client = new SvnClient())
{
client.Authentication.Clear();
client.Authentication.DefaultCredentials = new NetworkCredential(userName, password, domain);
client.Authentication.SslServerTrustHandlers += delegate (object sender, SvnSslServerTrustEventArgs e)
{
e.AcceptedFailures = e.Failures;
e.Save = true;
};
}
Edit
Some extra info
- The Visual SVN server uses Windows authentication - Integrated Window Authentication
client.Authentication.DefaultCredentials
is nullclient.Configuration
properties