Click here to Skip to main content
14,826,492 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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 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 skip this block because there's no working copy  yet
                    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...
                    client.CleanUp(path);
                    client.Update(path);
                    client.CleanUp(path);
                }
            }

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


I have searched for hours for solutions and can't find anything.

Both servers are setup with same port, same HTTPS settings and created certificates, same VisualSVN server editions.

What I have tried:

I have tried only the one solution that I could find as this is not a common issue at all.
This is supposed to fix that error but it doesn't.

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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900