����λ�ã���ҳ > �����̳� > �̳� > ��Linux�����в���.NET 8Ӧ�ö�ȡSSL֤��(X509)ʾ��

��Linux�����в���.NET 8Ӧ�ö�ȡSSL֤��(X509)ʾ��

��Դ������������|��ʱ�䣺2024-06-01 09:46:36 |���Ķ���157��|�� ��ǩ�� T Net v S C in AI Azure �� ���� ���� ʵ�� app Ӧ�� linux �� |����������

��ǰһƪ�����У������ǰ�.NET 8Ӧ�ö�ȡSSL֤��(X509)ʾ��������App Service Windows�����У���ô���������Linux�������Լ�Linux Container���أ� ����ǰ���еĵ�һ�ַ�����ֱ���ڰ�֤���ļ�������Դ�ļ��У�ͨ�����·����ȡ֤���ļ��ķ�ʽ�������ԣ�����������

��ǰһƪ�����У������ǰ�.NET 8Ӧ�ö�ȡSSL֤��(X509)ʾ��������App Service Windows�����У���ô���������Linux�������Լ�Linux Container���أ�

����ǰ���еĵ�һ�ַ�����ֱ���ڰ�֤���ļ�������Դ�ļ��У�ͨ�����·����ȡ֤���ļ��ķ�ʽ�������ԣ���������������

���ǣ����ڵڶ��֡� ͨ��ָ����ϵͳ֤����в���֤�� ���ķ�ʽ����Linuxϵͳ�У��Dz���ʹ�� X509Store(StoreName.My, StoreLocation.CurrentUser) �в��ҵķ�ʽ��

����������֤����App Service Linux( ����Linux Container)֤��ҳ���ϴ���֤���ϵͳ���֤�鱣��Ϊ�ļ����洢�� /var/ssl/ �ļ����У�����ͨ��ssh ��ʽ�鿴��

  1. ����App Service Kudu(�߼����ߣ�ҳ��: https://.scm.chinacloudsites.cn/webssh/host
  2. ���SSHĿ¼������cd Ŀ¼��� cd /var/ssl/private ���о�ȫ���ļ�: ls -ll

ÔÚLinux»·¾³Öв¿Êð.NET 8Ó¦ÓöÁÈ¡SSLÖ¤Êé(X509)ʾÀý

��.NET 8�����е���ȷ��ȡ˽��֤�� (.pfx)�Ĵ���ʾ����

ע�⣺

  • WEBSITE_LOAD_CERTIFICATES?������
  • �Ż��ϵ�֤�����Ӻ���Ҫ����վ�㣬�ȴ�ʵ���г���֤���ļ����� ͨ����15�������Һ������Ŀ¼�п��� thumbprint.p12�ļ� )

��¼��ʾ������(.NET 8.0 ������� program.cs)

�����

�� Linux/Windows �����м���֤�� : https://docs.azure.cn/zh-cn/app-service/configure-ssl-certificate-in-code#load-certificate-in-linuxwindows-containers

GetX509CertificateLinux(string thumbprint)?: https://learn.microsoft.com/en-us/answers/questions/1055731/application-error-on-linux-running-net-core

Load Certificate on Linux Web App #19305 : https://github.com/MicrosoftDocs/azure-docs/issues/19305

��END��

С���Ƽ��Ķ�

�������������Ľ�Ϊ������Ϣ����������������ͬ���޹۵��֤ʵ��������

�����Ƶ����

����

ͬ������

����

ɨ��ά�����������ֻ��汾��

ɨ��ά����������΢�Ź��ںţ�

��վ�������������������ϴ��������ַ���İ�Ȩ���뷢�ʼ�[email protected]

��ICP��2022002427��-10 �湫��������43070202000427��© 2013~2025 haote.com ������