0

Hiding PII (personally identifiable information) in a production system is a good idea and sometimes a legal obligation, but in a development environment while debugging it is ridiculous nonsense that makes error messages worthless. How can I configure this to be disabled in my debugger but enabled in production?

Peter Wone
  • 15,594
  • 12
  • 74
  • 106

1 Answers1

0

In code (netcore on Kestrel)

Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = env.IsDevelopment();

On a particular computer

<configuration>
  <system.serviceModel>
    <machineSettings enableLoggingKnownPii="true" />
  </system.serviceModel>
</configuration>
Peter Wone
  • 15,594
  • 12
  • 74
  • 106