- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在调试 Win 服务。我在服务器上添加了一些证书。试图通过序列号查找证书。 https://gyazo.com/9cdcda75e98fe7b7c35496976a5aaaeb
behaviors.config 部分:
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="DDBS.DDBSPasswordValidator, DDBS" />
<serviceCertificate findValue="1C5411F9D38252824C2EC1CC7E5EBE3F" x509FindType="FindBySerialNumber" storeLocation="LocalMachine" storeName="My" />
</serviceCredentials>
我收到错误:无法启动服务。 System.FormatException:无效的十六进制字符串格式。
最佳答案
来自 Jan Angelovič 于 MSDN Forum :
If you cut and paste the [Serial Number or Thumbprint] from the common certificate dialog, it is copied in UNICODE (UTF-16LE) encoding with special invisible control characters (0xFF and 0xFE aka “Byte order mark“) on the beginning of the string.
就个人而言,我通过指纹看到了这一点;从对话框剪切并粘贴到 Visual Studio 中保留了 2 个未显示的字符(可以用光标“逐步执行”并删除)。
关于c# - Windows 服务 serviceCredentials 无效的十六进制字符串格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34462702/
我正在调试 Win 服务。我在服务器上添加了一些证书。试图通过序列号查找证书。 https://gyazo.com/9cdcda75e98fe7b7c35496976a5aaaeb behaviors
我正在尝试创建一个使用 MembershipProvider 进行身份验证的 WCF 服务。因为它是一项内部服务,所以我目前对应用传输级安全性 (HTTPS) 并且我想(暂时)在没有证书的情况下执行此
我有一个作为 netTcpBinding 公开的 WCF 服务。 在服务方面: ... /
我是一名优秀的程序员,十分优秀!