0

i'am building an application that connect to SVN repository, it works with my credentials and my SVN access URL, but when i change the user and the URL it dosn't work.
the exception is :

 SharpSvn.SvnRepositoryIOException //Unable to connect to a repository at URL 

i checked the access of other users on browser and it works but in my app no! it works only with my SVN access URL even with the cridential of the admin. when i change the URI of SVN it generates the exception and does not return any thing

client.GetList(repo, out list); // list is null

Please Help me to solve this problem.

AtefB
  • 171
  • 1
  • 3
  • 16
  • Show some of your code, showing how you connect to the remote repository and indicate which statement fails. – RenniePet Apr 02 '15 at 08:35
  • Please check the whole error chain (e.g. use .ToString() on the exception). Subversion provides more error details than this in inner errors/exceptions. – Bert Huijben Apr 02 '15 at 13:06
  • sharpSvn.SvnRepositoryIOForbiddenException Unable to connect to a repository at URL https://svn.mysvn-apps.com/svn/PFE-DirDev-KPN/ – AtefB Apr 02 '15 at 14:20

1 Answers1

0
Uri url = new Uri("https://svn.mysvn-apps.com/svn/PFE-DirDev-KPN/");   

client.Authentication.DefaultCredentials = new NetworkCredential("user", "password");
        client.Authentication.SslServerTrustHandlers += delegate(object sender, SvnSslServerTrustEventArgs e)
        {
            e.AcceptedFailures = e.Failures;
            e.Save = true;
        };


Collection<SvnListEventArgs> list;
SvnUriTarget repo = new SvnUriTarget(url);

try
{
   client.GetList(repo, out list); // here generates the exception 
}
catch (Exception e)
{
   // Do this or write e.ToString() to a log file or examine e in the Visual Studio debugger
   Console.WriteLine(e.ToString());
}
RenniePet
  • 11,420
  • 7
  • 80
  • 106
AtefB
  • 171
  • 1
  • 3
  • 16
  • You shouldn't really post additional information as an answer, you should edit your question and add the code there. – RenniePet Apr 02 '15 at 16:05
  • Anyway, I've modified your code to show you what @BertHuijben is suggesting; that you get more information from the exception by applying .ToString() to the exception. Bert is suggesting that there may be meaningful information in the "InnerException" field of the exception. – RenniePet Apr 02 '15 at 16:07
  • There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SharpSvn", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. – AtefB Apr 03 '15 at 08:16
  • now it returns null. it returns a list for some svn Urls and others it returns null!! – AtefB Apr 03 '15 at 08:17