이 주제에 대한 비슷한 질문이 몇 가지 있습니다.하지만 그 중 아무 것도 대답이없는 것 같아서 여기에 모두 해싱 할 수 있다고 생각했습니다.WCF 서비스 중 OnShutDown()
내 서버에서 WCF 서비스가 실행 중이며 "OnShutDown()"을 재정 의하여 서버가 종료 될 때 상태 메시지를 보내려고합니다.
System.ServiceModel.Security.SecurityNegotiationException: Could not establish secure channel for SSL/TLS with authority '"ENDPOINT ADDRESS REMOVED'. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitF orReply(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebExceptoon webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Ascertain.AscertainAgent.IService.updateInvStatus(String hostNM, String invValue)
at Ascertain.AscertainAgent.ServiceClient.updateInvStatus(String hostNM, String invValue) in C:\Users\daladd\Documents\CS\Ascertain\Ascertain\Ascertain\Service References\AscertainAgent\Reference.cs:line 209
at Ascertain.Service1.OnShutdown() in "FILE LOCATION REMOVED"\Service1.cs:line224
사람이 어떤이 있습니까 :
protected override void OnShutdown()
{
try
{
client.updateInvStatus(machineName, "Client Host Has Shutdown");
}
catch (Exception ex)
{
EH.writeToErrorLog("||OnShutdown||Error Shutting Down System \r\n" + ex);
}
base.OnShutdown();
}
이 시간의 약 50 %, 나는 다음과 같은 오류를 얻을 다른 50 %를 작동하는 것 같다 다음과 같이
이
볼 수 있습니다 왜 이런 일이 일어날까요?
그냥 추측하지만 경쟁 조건입니까? 서버가 종료되었다는 것을 모든 사람에게 알리기 위해 메시지를 보낼 수있는 것보다 빨리 종료되고 있습니까? 아마도 최종 메시지를 보낸 후 지연이 도움이 될 수 있습니까? –
서비스 요청이 종료되기 전에 더 많은 시간을 요구하지만 Microsoft는 Vista 이후이 기능을 크게 제한했습니다. 이것은 절대적으로 문제가 될 수 있지만 나는 그 경우 시간의 100 %를 실패 할 것이라고 생각합니다. – vesuvious
이 반드시 그런 것은 아니기 때문에 경쟁 조건이라고합니다. –