I am writing a windows service where i need to notify an API that windows is shutting down. For that i have used windows service onShutdown event. On this event i am sending information to API. My API is running on the https(using self singed certificate).
Now when I am calling the API in windows service then it called successfully and getting the proper response.
But when I am calling the API in onShutdown event, it gives me an error "could not create SSL/TLS secure channel"