I have 2 Software applications:
- An interface software that normally should run as a Windows service
- and an emulator whose goal is to test this Windows service
Both are
- written in ASP.NET Core 3.1,
- both use the Kestrel web server,
- both can act as a client and as a server to each other,
- both automatically choose an appropriate certificate from certificate storage (Current User or Local Machine).
To test things I generated a self signed certificate for localhost and installed it in Local MachineRoot CA.
Everything is fine when interface and emulator are running as normal applications. They can perform a bidirectional communication.
When I start the interface as Windows service, the emulator can connect to it, but when the interface software uses its client (a descendant of System.ServiceModel.ClientBase<T>
), it cannot connect to the emulator. The error is:
Could not establish trust relationship for the SSL/TLS secure channel with authority ‘localhost:44357’
Please feel free to ask for additional information, because I don’t know which information could be relevant.
2