Moving to a new PC

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SystematicBettingDotCom
    Junior Member
    • Jul 2013
    • 11

    #1

    Moving to a new PC

    Hi I am migrating to a new PC ans was wondering if there are any API problems I need to watch out for. Is it a case of simply copying all files across that reside on my old PC. Tried this but it seems to not allow me to login, requiring CERT_AUTH. Appreciate any advice
  • LetsGo
    Senior Member
    • Oct 2018
    • 112

    #2
    Done this many times, you just need to create the same folders and copy the files from the "API_NG_OpenSSL" folder.
    Check all your folder names are the same.
    Last edited by LetsGo; 08-09-2019, 05:09 PM.

    Comment

    • SystematicBettingDotCom
      Junior Member
      • Jul 2013
      • 11

      #3
      Thanks for the response, I do not have a API_NH_OpenSSL folder I have a folder with the four client-2048 files and I have copied those over but get the above mentioned problem

      Comment

      • LetsGo
        Senior Member
        • Oct 2018
        • 112

        #4
        I don't think the folder name is important.

        I have a folder named c:\API_NG_OpenSSL with 5 files:-
        client-2048.crt
        client-2048.csr
        client-2048.key
        client-2048.p12
        client-2048.pem


        and a line in my code as follows:-

        X509Certificate2 x509certificate = new X509Certificate2("c:\\API_NG_OpenSSL\\client-2048.p12", "password");

        I've copied these about different servers and never had any problems.


        Comment

        • LiamP
          Junior Member
          • Oct 2015
          • 284

          #5
          Difficult to say without seeing the code, what was the directory in your old computer compared to new and have you updated it?

          Comment

          • SystematicBettingDotCom
            Junior Member
            • Jul 2013
            • 11

            #6
            I have copied over the client-2048.crt pem csr and key files to the corresponding folder on new PC

            Comment

            • SystematicBettingDotCom
              Junior Member
              • Jul 2013
              • 11

              #7
              Hi LetsGo when you say 'in your code' which code are you referring to ?., thanks

              Comment

              • LetsGo
                Senior Member
                • Oct 2018
                • 112

                #8
                Originally posted by SystematicBettingDotCom View Post
                Hi LetsGo when you say 'in your code' which code are you referring to ?., thanks
                It's the c# code I use in my program to login and access the client-2048.p12 file.


                const string postData = "username=??????&password=??????";
                X509Certificate2 x509certificate = new X509Certificate2("c:\\API_NG_OpenSSL\\client-2048.p12", "??????");
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://identitysso-cert.betfair.com/api/certlogin");
                request.UseDefaultCredentials = true;
                request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
                request.Method = "POST";
                request.ContentType = "application/x-www-form-urlencoded";
                request.Headers.Add("X-Application", AppKey_Api_ng);
                request.ClientCertificates.Add(x509certificate);
                request.Accept = "*/*";
                request.Proxy = null;

                Comment

                • SystematicBettingDotCom
                  Junior Member
                  • Jul 2013
                  • 11

                  #9
                  I am working in Python and on my new machine a login attempt gives me

                  CERT_AUTH_REQUIRED

                  Even though I have copied over all client-2048 files

                  Comment

                  Working...
                  X