在生产系统中隐藏PII (个人识别信息)是一个好主意,有时还是一项法律义务,但在开发环境中调试时,这是荒谬的胡说八道,使错误消息毫无价值。如何将其配置为在调试器中禁用,但在生产中启用?
发布于 2020-08-12 09:13:11
在代码中(Kestrel上的netcore)
Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = env.IsDevelopment();在特定的计算机上
<configuration>
<system.serviceModel>
<machineSettings enableLoggingKnownPii="true" />
</system.serviceModel>
</configuration>https://stackoverflow.com/questions/63368364
复制相似问题