Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Windows Azure Partner Application #128

Closed
jmawebtech opened this issue Nov 1, 2015 · 1 comment · Fixed by #142
Closed

Windows Azure Partner Application #128

jmawebtech opened this issue Nov 1, 2015 · 1 comment · Fixed by #142

Comments

@jmawebtech
Copy link

Hi,

I am running my app using the Windows Azure cloud. I have some questions about XeroApiHelper.cs:

  1. What code must be modified to run this solution in the Windows Azure cloud?
  2. Do I need a signingCertificatePath and a clientCertificatePath?
  3. How do I obtain the signingCertificatePath? I see code on splitting the P12 Entrust SSL certificate. Is this how I obtain it? I added the P12 file to MMC and then I exported it. I received a PFX file. Is that what I need?
  4. When I run the solution locally, I see this error:

The specified network password is not correct.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Security.Cryptography.CryptographicException: The specified network password is not correct.

Source Error:

Line 80: var partnerConsumer = new Consumer(partnerConsumerKey, partnerConsumerSecret);
Line 81:
Line 82: var partnerAuthenticator = new PartnerMvcAuthenticator(basePartnerApiUrl, baseApiUrl, callbackUrl,
Line 83: memoryStore, signingCertificatePath, clientCertificatePath, clientCertificatePassword,
Line 84: partnerConsumer, requestTokenStore);

http://developer.xero.com/documentation/getting-started/partner-applications/#certificates

@jmawebtech
Copy link
Author

Hi,

Please change this code:

\Xero.Api.Example.Applications\Partner\PartnerMVCAuthenticator.cs

    public PartnerMvcAuthenticator(string baseUri, string authorizeUri, string callBackUri, 
        ITokenStore store, string signingCertificatePath, string certificatePath, string password,
        IConsumer consumer, ITokenStore requestTokenStore)
        : this(baseUri, authorizeUri, callBackUri, store, consumer, requestTokenStore)
    {
        //_signingCertificate = new X509Certificate2(signingCertificatePath);
        _signingCertificate = new X509Certificate2(signingCertificatePath, "Password Used to Make Self Signed Certificate X509", X509KeyStorageFlags.MachineKeySet);
        _certificate = new X509Certificate2(certificatePath, password);            
    }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant