Chúng ta có thể đọc phần chứng chỉ withi tệp ServiceConfiguration.cscfg bằng C# không? Có phương thức bên trong lớp RoleEnvironment để đọc ConfigurationSettings, nhưng không phải là phần chứng chỉ.Đọc phần chứng chỉ của tập tin ServiceConfiguration bằng cách sử dụng C#
<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="WindowsAzureProject7" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*">
<Role name="MvcWebRole1" >
<Instances count="1" />
<Certificates>
<Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="625FBBB3B7A25C4B9D1C49D1CB1E3AE196C1A083" thumbprintAlgorithm="sha1" />
</Certificates>
</Role>
</ServiceConfiguration>
+1 Nhưng bạn cũng cần khai báo cài đặt trong định nghĩa dịch vụ. –