【问题标题】:Parser Error Message: ID1024: The configuration property value is not valid. Property name: 'serviceCertificate'解析器错误消息:ID1024:配置属性值无效。属性名称:'serviceCertificate'
【发布时间】:2019-06-09 17:42:00
【问题描述】:

Parser Error Message: ID1024:我在 .net 4.7 和 https 中有一个应用程序。当我在图像中运行应用程序时,出现以下错误:

 Parser Error Message: ID1024: The configuration property value is not valid.
Property name: 'serviceCertificate'
Error: 'ID1039: The certificate's private key could not be accessed. Ensure the access control list (ACL) on the certificate's private key grants access to the application pool user.
Thumbprint: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx''


DOCKER FILE
FROM microsoft/aspnet:4.7.2-windowsservercore-1803
ARG site_root=.
ADD ${site_root} /inetpub/wwwroot

EXPOSE 443

#Set the CERT_PASS with the password of your PFX certificate
ENV CERT_PASS 3889878999H#

#Eventually modify the path of your Powershell script
RUN ["powershell", "C:/inetpub/wwwroot/ssl.ps1"]

ssl.ps1

$securePfxPass = [Environment]::GetEnvironmentVariable("CERT_PASS") | ConvertTo-SecureString -AsPlainText -Force
Import-PfxCertificate -Password $securePfxPass -CertStoreLocation Cert:\LocalMachine\My -FilePath c:\inetpub\wwwroot\service.nextway.corp.v3.pfx  

$pfxThumbprint = (Get-PfxData -FilePath c:\inetpub\wwwroot\service.nextway.corp.v3.pfx -Password $securePfxPass).EndEntityCertificates.Thumbprint


$binding = New-WebBinding -Name "SSO" -Protocol https -IPAddress * -Port 443 ;
$binding = Get-WebBinding -Name "SSO" -Protocol https;
$binding.AddSslCertificate($pfxThumbprint, "my");

#You should remove both the PFX password from the Environment Variable and the .pfx file
[Environment]::SetEnvironmentVariable("CERT_PASS",$null)

【问题讨论】:

    标签: windows docker application-pool


    【解决方案1】:

    在我们的环境中,这是 ADFS 和指纹问题,通常源于不正确的证书指纹。 安装程序手动将指纹粘贴到使用 Web 应用程序的 web.config 文件中。 粘贴时,在文本之前或之后也粘贴了一个秘密或隐藏字符,但它是看不见的,导致 ID1024 或 ID1039。 找到一种方法来确保将指纹插入 web.config 以避免从 Word 或记事本粘贴时出现的秘密或隐藏字符。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-08
      • 1970-01-01
      • 2019-03-11
      • 1970-01-01
      • 2012-10-16
      相关资源
      最近更新 更多