SVN credentials

  • Thread starter Thread starter Domleg
  • Start date Start date
D

Domleg

Guest
I have an issue where I keep getting an error

No provider registered for 'svn.ssl.server' credentials

I am using the same code that works on another SVN server, but a new server I setup, the C# SharpSVN code can't seem to connect even though I can connect no problem through a web browser.




//SVN Client repo sync

public void DownloadSVNStartup(string url, string path)
{

using (SvnClient client = new SvnClient())
{
try
{
client.CleanUp(path); //will go to catch block since there's no working copy yet I
//want to checkout for the first time then next time this part
//will work.
SvnUI.Bind(client, this);
SvnCheckOutArgs sco = new SvnCheckOutArgs();
sco.AllowObstructions = false;
}
catch (Exception ex)
{
MessageBox.Show("Line 88");
MessageBox.Show(ex.ToString());
myLog.WriteEntry(ex.ToString(), EventLogEntryType.Error);
}

client.Configuration.SetOption("servers", "global", "http-auth-types", "basic;digest");
client.Authentication.Clear();
client.Authentication.ForceCredentials("user", "password");

try
{
client.Authentication.SslServerTrustHandlers += delegate (object sender,
SvnSslServerTrustEventArgs e)
{
e.AcceptedFailures = e.Failures;
e.Save = false; // Save acceptance to authentication store
};

Object[] args = { url, path };
BackgroundWorker worker = new BackgroundWorker();
worker.DoWork += backgroundWorker1_DoWork;
worker.RunWorkerAsync(args);
this.Hide();

}
catch (Exception ex)
{
MessageBox.Show("Line126");
MessageBox.Show(ex.ToString());
myLog.WriteEntry(ex.ToString(), EventLogEntryType.Error);
}
}
}

private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) //connect to the Svn
//server
{
try

{
Object[] arg = e.Argument as Object[];
string url = (string)arg[0];
string path = (string)arg[1];

using (SvnClient client = new SvnClient())
{
client.Authentication.Clear(); // Prevents saving/loading config to/from disk
client.Authentication.ForceCredentials("user", "password");
client.CheckOut(new Uri(url), path); //fails here with the error No provider registered for 'svn.ssl.server' credentials
client.CleanUp(path);
client.Update(path);
client.CleanUp(path);
}
}

catch (Exception ex)
{
MessageBox.Show("Line166", ex.Message.ToString());
MessageBox.Show(ex.ToString());
}
}

Continue reading...
 
Back
Top