meysamhadeli / booking-microservices

Practical microservices, built with .Net 8, DDD, CQRS, Event Sourcing, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
MIT License
907 stars 182 forks source link

System.Security.Cryptography.CryptographicException #278

Closed 1988gadocansey closed 11 months ago

1988gadocansey commented 11 months ago

When i run the docker compose i get the error below

09:41:18 [INFO] Background worker stopped 2023-10-04 09:41:18 09:41:18 [INFO] Subscription to all '"default"' 2023-10-04 09:41:19 09:41:18 [EROR] Hosting failed to start 2023-10-04 09:41:19 System.Security.Cryptography.CryptographicException: The certificate data cannot 2023-10-04 09:41:19 be read with the provided password, the password may be incorrect. 2023-10-04 09:41:19 System.Security.Cryptography.CryptographicException: The certificate data
2023-10-04 09:41:19 cannot be read with the provided password, the password may be incorrect.
2023-10-04 09:41:19 at void System.Security.Cryptography.X509Certificates.UnixPkcs12Reader.
2023-10-04 09:41:19 VerifyAndDecrypt(ReadOnlySpan password, ReadOnlyMemory
2023-10-04 09:41:19 authSafeContents)
2023-10-04 09:41:19 at void System.Security.Cryptography.X509Certificates.UnixPkcs12Reader.
2023-10-04 09:41:19 Decrypt(SafePasswordHandle password, bool ephemeralSpecified)
2023-10-04 09:41:19 at void System.Security.Cryptography.X509Certificates.UnixPkcs12Reader.Decrypt 2023-10-04 09:41:19 (SafePasswordHandle password, bool ephemeralSpecified)
2023-10-04 09:17:21 Unhandled exception. System.Security.Cryptography.CryptographicException: The certificate data cannot be read with the provided password, the password may be incorrect. 2023-10-04 09:17:21 ---> System.Security.Cryptography.CryptographicException: The certificate data cannot be read with the provided password, the password may be incorrect. 2023-10-04 09:17:21 at System.Security.Cryptography.X509Certificates.UnixPkcs12Reader.VerifyAndDecrypt(ReadOnlySpan1 password, ReadOnlyMemory1 authSafeContents)

meysamhadeli commented 11 months ago

Hi,

This error is because you didn't configure a certificate for the project. Please follow this part and your problem will be solved :) https://github.com/meysamhadeli/booking-microservices#config-certificate

Here, in your exception, mention to this problem exactly: 2023-10-04 09:17:21 Unhandled exception. System.Security.Cryptography.CryptographicException: The certificate data cannot be read with the provided password, the password may be incorrect.