-1

I have developed a program that talks with Xero in .NET. When I run the program from VS, it communicates with Xero and works without a problem but when I publish the web application, it cannot make communication with Xero.

The error I get is 'An Internal Error Occurred' relating to the Xero Certificate yet when I run it from VS it does work without a problem.

The certificate are inside a folder.

X509Certificate2 privateCertificate = new X509Certificate2(@"C:\SSLCertificate\\public_privatekey.pfx", "XXXXXX");
            IOAuthSession consumerSession = new XeroApiPrivateSession("MyAPITestSoftware", "XXXXXXXXXXXXXXXXXXXXXXX", privateCertificate);
            consumerSession.MessageLogger = new DebugMessageLogger();

Thanks Saj

DeanOC
  • 7,142
  • 6
  • 42
  • 56
Saj
  • 297
  • 3
  • 6
  • 23
  • It would help if you can provide the code used to connect, and the error message(s) you are getting. – DeanOC Jul 21 '15 at 01:48

1 Answers1

0

More than likely the user the web app is executing under doesn't have access to that directory.

Look at your IIS configuration then give the application pool identity read access to the C:\SSLCertificate\ directory.

NotMe
  • 87,343
  • 27
  • 171
  • 245