安全处理器无法在消息中找到安全标头

发布于 2024-09-24 07:25:18 字数 3096 浏览 4 评论 0原文

最近,在我的一台机器上,我的客户端(WCF 客户端)与 WCF 服务器通信时遇到问题。服务器和客户端都运行在同一台机器上。机器是Windows7 64位机器。直到最近它一直工作得很好。相同的软件在具有完全相同配置的所有其他机器上运行良好。我在这里真的很困惑。有人可以让我知道可能是什么问题吗?

异常类型: System.ServiceModel.Security.MessageSecurityException、System.ServiceModel、版本=3.0.0.0、文化=中性、PublicKeyToken=b77a5c561934e089

消息: 安全处理器无法在消息中找到安全标头。这可能是因为该消息是不安全的错误,或者是因为通信双方之间存在绑定不匹配。如果服务配置为安全性并且客户端未使用安全性,则可能会发生这种情况。

堆栈跟踪: System.ServiceModel.Security.TransportSecurityProtocol.VerifyIncomingMessageCore(消息&消息,TimeSpan超时) System.ServiceModel.Security.TransportSecurityProtocol.VerifyIncomingMessage(消息&消息,TimeSpan超时) System.ServiceModel.Security.SecurityProtocol.VerifyIncomingMessage(消息&消息、TimeSpan超时、SecurityProtocolCorrelationState[]correlationStates) System.ServiceModel.Channels.SecurityChannelListener1.ServerSecurityChannel1.VerifyIncomingMessage(Message&消息,TimeSpan超时,SecurityProtocolCorrelationState[]correlationState) System.ServiceModel.Channels.SecurityChannelListener1.SecurityReplyChannel.ProcessReceivedRequest(RequestContext requestContext, TimeSpan 超时) System.ServiceModel.Channels.SecurityChannelListener1.ReceiveRequestAndVerifySecurityAsyncResult.ProcessInnerItem(RequestContext innerItem,TimeSpan超时) System.ServiceModel.Channels.SecurityChannelListener1.ReceiveItemAndVerifySecurityAsyncResult2.OnInnerReceiveDone() System.ServiceModel.Channels.SecurityChannelListener1.ReceiveItemAndVerifySecurityAsyncResult2.InnerTryReceiveCompletedCallback(IAsyncResult 结果) System.ServiceModel.Diagnostics.Utility.AsyncThunk.UnhandledExceptionFrame(IAsyncResult 结果) System.ServiceModel.AsyncResult.Complete(布尔值同步完成) System.ServiceModel.Channels.InputQueue1.AsyncQueueReader.Set(项目项) System.ServiceModel.Channels.InputQueue1.EnqueueAndDispatch(Ite​​m item, Boolean canDispatchOnThisThread) System.ServiceModel.Channels.InputQueue1.EnqueueAndDispatch(T item, ItemDequeuedCallback dequeuedCallback, Boolean canDispatchOnThisThread) System.ServiceModel.Channels.InputQueueChannel1.EnqueueAndDispatch(TDisposable item, ItemDequeuedCallback dequeuedCallback, Boolean canDispatchOnThisThread) System.ServiceModel.Channels.SingletonChannelAcceptor`3.Enqueue(QueueItemType item, ItemDequeuedCallback dequeuedCallback, Boolean canDispatchOnThisThread) System.ServiceModel.Channels.HttpChannelListener.HttpContextReceived(HttpRequestContext上下文,ItemDequeuedCallback回调) System.ServiceModel.Channels.SharedHttpTransportManager.OnGetContextCore(IAsyncResult结果) System.ServiceModel.Channels.SharedHttpTransportManager.OnGetContext(IAsyncResult结果) System.ServiceModel.Diagnostics.Utility.AsyncThunk.UnhandledExceptionFrame(IAsyncResult结果) System.Net.LazyAsyncResult.Complete(IntPtr userToken) System.Net.LazyAsyncResult.ProtectedInvokeCallback(对象结果,IntPtr userToken) System.Net.ListenerAsyncResult.WaitCallback(UInt32 errorCode,UInt32 numBytes,NativeOverlapped * nativeOverlapped) System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

谢谢, 苏雷什

Recently on one of my machines, my client (WCF client) is having problem talking to WCF server. Both server and client are running on the same machine. The machine is Windows7 64 bit machine. It used to work fine until recently. The same software is working fine on all other machines with exactly same configuration. I am really confused here. Could someone please let me know what could be the problem?

Exception Type:
System.ServiceModel.Security.MessageSecurityException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Message:
Security processor was unable to find a security header in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security.

Stack Trace:
System.ServiceModel.Security.TransportSecurityProtocol.VerifyIncomingMessageCore(Message& message, TimeSpan timeout)
System.ServiceModel.Security.TransportSecurityProtocol.VerifyIncomingMessage(Message& message, TimeSpan timeout)
System.ServiceModel.Security.SecurityProtocol.VerifyIncomingMessage(Message& message, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates)
System.ServiceModel.Channels.SecurityChannelListener1.ServerSecurityChannel1.VerifyIncomingMessage(Message& message, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationState)
System.ServiceModel.Channels.SecurityChannelListener1.SecurityReplyChannel.ProcessReceivedRequest(RequestContext requestContext, TimeSpan timeout)
System.ServiceModel.Channels.SecurityChannelListener
1.ReceiveRequestAndVerifySecurityAsyncResult.ProcessInnerItem(RequestContext innerItem, TimeSpan timeout)
System.ServiceModel.Channels.SecurityChannelListener1.ReceiveItemAndVerifySecurityAsyncResult2.OnInnerReceiveDone()
System.ServiceModel.Channels.SecurityChannelListener1.ReceiveItemAndVerifySecurityAsyncResult2.InnerTryReceiveCompletedCallback(IAsyncResult result)
System.ServiceModel.Diagnostics.Utility.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
System.ServiceModel.Channels.InputQueue1.AsyncQueueReader.Set(Item item)
System.ServiceModel.Channels.InputQueue
1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread)
System.ServiceModel.Channels.InputQueue1.EnqueueAndDispatch(T item, ItemDequeuedCallback dequeuedCallback, Boolean canDispatchOnThisThread)
System.ServiceModel.Channels.InputQueueChannel
1.EnqueueAndDispatch(TDisposable item, ItemDequeuedCallback dequeuedCallback, Boolean canDispatchOnThisThread)
System.ServiceModel.Channels.SingletonChannelAcceptor`3.Enqueue(QueueItemType item, ItemDequeuedCallback dequeuedCallback, Boolean canDispatchOnThisThread)
System.ServiceModel.Channels.HttpChannelListener.HttpContextReceived(HttpRequestContext context, ItemDequeuedCallback callback)
System.ServiceModel.Channels.SharedHttpTransportManager.OnGetContextCore(IAsyncResult result)
System.ServiceModel.Channels.SharedHttpTransportManager.OnGetContext(IAsyncResult result)
System.ServiceModel.Diagnostics.Utility.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
System.Net.LazyAsyncResult.Complete(IntPtr userToken)
System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
System.Net.ListenerAsyncResult.WaitCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Thank you,
Suresh

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文