var connection = new HubConnectionBuilder().WithUrl(serverUrl, option => { option.HttpMessageHandlerFactory = (handler) => { var newHandler = handler as HttpClientHandler; newHandler.ServerCertificateCustomValidationCallback = (request, cert, chain, errors) => { return true; }; return newHandler; }; }).Build();
原文:https://www.cnblogs.com/li517451737/p/10365188.html