小编Pet*_*ofi的帖子

Azure DevOps Powershell 脚本无法创建 SSL/TLS 安全通道

问题:
如果我从DevOps管道中的“Azure Powershell”任务中调用命令Get-AzureDeployment(也称为Get-AzureService),我会得到:“请求被中止:无法创建 SSL/TLS 安全通道。'

介绍:

  • 我使用 Azure DevOps 将 Azure 云服务(经典)部署到 Azure
  • “Azure Powershell”任务一直在工作,但没有改变任何东西它停止工作
  • 我还将证书(由 DevOps 使用)导入我的电脑(通过 Import-AzurePublishSettingsFile)并尝试运行相同的 powershell 脚本,并且 everytnig 工作正常,所以我希望 DevOps 中出现问题

DevOps 连接:

  • 我在 Azure DevOps 中创建了“服务连接”以连接到 Azure
  • 服务连接是“Azure Classic”类型(因为“Azure Resource Manager”不适用于“Cloud service classic”)
  • “Azure 经典服务连接”的身份验证方法是“基于证书”。
  • 我将“发布设置文件”生成的证书用于我的 azure 订阅。证书被azure放入我的订阅->管理证书(到期日期为2021年年中)
  • 我使用此服务连接将应用程序(云服务经典)部署到 Azure中没有问题(通过 DevOps 任务“Azure 云服务部署”),但只是“Azure Powershell”任务开始失败

这一切都工作了 3 个月,然后因任何原因停止工作。奇怪的是,当我在玩 DevOps 以找出问题所在时,该任务曾经成功运行,但是当我再次尝试时,我又出现了错误。

我有两个日志,从成功调用和失败调用。2506行日志是相同的,变化在这一行之后。

我可以给你发送完整的日志,但我不想在这里放这么长的日志。

成功尝试:

VERBOSE: 8:31:40 AM - Begin …
Run Code Online (Sandbox Code Playgroud)

powershell ssl azure azure-devops

10
推荐指数
1
解决办法
1741
查看次数

NLog - 如何解密日志文件

我登录了我的网站,我想对日志文件进行加密。要加密日志文件,我只需将属性fileAttributes="Encrypted" 添加到配置文件中,您如何在此处看到:

    <target name="file" xsi:type="File"
        layout="${longdate} | ${pad:padding=-5:inner=${level:uppercase=true}} | ${message} ${onexception:inner=${newline}   ${exception:format=ToString}}"
        fileName="${basedir}/Log/log_info.log"
        fileAttributes="Encrypted"
        archiveFileName="${basedir}/Log/log_info_{#}.log"
        archiveAboveSize="1048576"
        archiveNumbering="Rolling"
        maxArchiveFiles="2"
        concurrentWrites="true"
        keepFileOpen="false" />
Run Code Online (Sandbox Code Playgroud)

问题:如何解密文件以查看日志记录?

c# encryption nlog

4
推荐指数
1
解决办法
1658
查看次数

标签 统计

azure ×1

azure-devops ×1

c# ×1

encryption ×1

nlog ×1

powershell ×1

ssl ×1