Re: .NET Core 3.1: The credentials supplied to the package were not recognized

Solved! Go to solution
aleitner
Regular Visitor

.NET Core 3.1: The credentials supplied to the package were not recognized

Dear all,

 

I've been trying to connect to the VISA API 'https://sandbox.api.visa.com//forexrates/v1/foreignexchangerates'. Everything works fine with SOAP UI, so I guess generating the .p12 keystore worked.

Trying to connect from my .NET core application using the provided sample code from VISA I constantly get this WebException:

System.Net.WebException: The SSL connection could not be established, see inner exception. The credentials supplied to the package were not recognized
---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.ComponentModel.Win32Exception (0x8009030D): The credentials supplied to the package were not recognized

 

Any ideas on how to resolve this issue? I made sure all credentials, paths etc used in the application are correct. Thank you 

17 REPLIES 17
API_Products
Visa Developer Support Specialist

Re: .NET Core 3.1: The credentials supplied to the package were not recognized

Hey @aleitner,

 

I've created case #INC9063600 for the engineering team to investigate. We're currently working to resolve your issue and someone will get back to you soon. Feel free to reach out to us if you have other questions.

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

aleitner
Regular Visitor

Re: .NET Core 3.1: The credentials supplied to the package were not recognized

Hello,
could your engineering team already investigate this issue? Are there any other users with the same problem? Thank you
API_Products
Visa Developer Support Specialist

Re: .NET Core 3.1: The credentials supplied to the package were not recognized

Hey @aleitner,

 

We're currently working on the issue and I'm unaware of other users experiencing this issue at this time. Can you please let us know what type of customer you are (e.g. consumer, issuer, merchant, payment processor, partner, etc.)? Also, please let us know the region you are from.

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

API_Products
Visa Developer Support Specialist

Re: .NET Core 3.1: The credentials supplied to the package were not recognized

Hey @aleitner,

 

I've attached a simple working Hello World project built with C# that could help you get started with the integration. Please let us know if you have questions or need further assistance.

Note: Zip file Password : dotnet

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

bstricker
Regular Visitor

Re: .NET Core 3.1: The credentials supplied to the package were not recognized

I had same problem connecting to the API via C# (.NET Core).

The hello world project is using .NET Framework and resulted in a similar exception like the one of my .NET Core project.

 

The .NET Core project fails with the same error as @aleitner described:

The SSL connection could not be established, see inner exception. The credentials supplied to the package were not recognize

 The .NET Framework project fails with the following WebException:

SecureChannelFailure - The request was aborted: Could not create SSL/TLS secure channel.

 

So in my opinion these two errors are more or less the same problem.

 

The following post in the VDC Forum suggests a solution from the GitHub samples which are unfortunately not available anymore: https://community.developer.visa.com/t5/Connection-Security-Errors/The-request-was-aborted-Could-not...

 

Since one comment suggest generating the p12 certificates differently, I tried a different openssl command then the one in the Get Started-VDC tutorial.

 

Instead of using the suggested command to create the p12 file from the key and certificate:

 

> openssl pkcs12 -export -in cert.pem -inkey "privateKey.pem" -certfile cert.pem -out myProject_keyAndCertBundle.p12

 

use the following command without the -certfile param:

 

> openssl pkcs12 -export -in cert.pem -inkey "privateKey.pem" -out myProject_keyAndCertBundle.p12

 

Since the newly generated certificate still works in SoapUI and Postman I think the command in the tutorials is wrong or outdated (at least for C# projects).

 

Hope this solves your problem.

API_Products
Visa Developer Support Specialist

Re: .NET Core 3.1: The credentials supplied to the package were not recognized

Hey @aleitner,

 

Can you please share your test results with us and confirm if your issue is resolved?

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

API_Products
Visa Developer Support Specialist

Re: .NET Core 3.1: The credentials supplied to the package were not recognized

Hey @bstricker,

 

 Thanks for sharing how you were able to resolve the issue and your test results with us.  As mentioned in Community for C# Projects the command to generate .p12 should be as below:

 

> openssl pkcs12 -export -in cert.pem -inkey "privateKey.pem" -out myProject_keyAndCertBundle.p12

 

Can you please confirm if you are seeing any other issue with the related to C# Sample code? 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

API_Products
Visa Developer Support Specialist

Re: .NET Core 3.1: The credentials supplied to the package were not recognized

Hey @bstricker,

 

To follow up, our engineering team tried out the commands from the VDP Portal for C# and they were able to proceed further without any issues.  Please let us know if you're experiencing any issue and I'd be happy to help.

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

aleitner
Regular Visitor

Re: .NET Core 3.1: The credentials supplied to the package were not recognized

Hello,

 

the solution suggested by @bstricker did the trick for me. Thanks a lot!