Сообщение об ошибке синтаксического анализатора: ID1024: значение свойства конфигурации недопустимо.Название недвижимости: «сервис-сертификат» - PullRequest
0 голосов
/ 15 января 2019

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)
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...