2009-12-28 59 views
2

在安全头我已经使用开发服务器的IIS托管的WCF服务的一个基于Windows的应用程序。我正在调用服务中定义的方法来在SQL数据库上运行SSIS包。该方法根据包是否成功执行向客户端返回成功或失败。错误:安全处理器是无法找到的消息

包被在任何时候成功的数据库中执行,但只有当包的时间超过大约10分钟更长的时间来执行服务引发此错误。否则,我不会得到这个错误。

我已经尝试没有成功如下: -

  1. 增加的app.config客户端超时价值较高的像20分钟。
  2. web.config所述的httpRuntime executionTimeout值增加到高值等7200秒。

的追踪日志包含以下错误: -

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

堆栈跟踪:

System.ServiceModel.Security.SecurityStandardsManager.CreateReceiveSecurityHeader(Message message, String actor, SecurityAlgorithmSuite algorithmSuite, MessageDirection direction) System.ServiceModel.Security.MessageSecurityProtocol.CreateSecurityHeader(Message message, String actor, MessageDirection transferDirection, SecurityStandardsManager standardsManager) System.ServiceModel.Security.MessageSecurityProtocol.ConfigureReceiveSecurityHeader(Message message, String actor, SecurityProtocolCorrelationState[] correlationStates, SecurityStandardsManager standardsManager, IList 1& supportingAuthenticators) System.ServiceModel.Security.InitiatorSessionSymmetricMessageSecurityProtocol.VerifyIncomingMessageCore(Message& message, String actor, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates) System.ServiceModel.Security.MessageSecurityProtocol.VerifyIncomingMessage(Message& message, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates) System.ServiceModel.Security.SecuritySessionClientSettings 1.ClientSecuritySessionChannel.VerifyIncomingMessage(Message& message, TimeSpan timeout, SecurityProtocolCorrelationState correlationState) System.ServiceModel.Security.SecuritySessionClientSettings 1.ClientSecuritySessionChannel.ProcessIncomingMessage(Message message, TimeSpan timeout, SecurityProtocolCorrelationState correlationState, MessageFault& protocolFault) System.ServiceModel.Security.SecuritySessionClientSettings 1.ClientSecuritySessionChannel.ProcessRequestContext(RequestContext requestContext, TimeSpan timeout, SecurityProtocolCorrelationState correlationState) System.ServiceModel.Security.SecuritySessionClientSettings 1.ClientSecuritySessionChannel.ReceiveInternal(TimeSpan timeout, SecurityProtocolCorrelationState correlationState) System.ServiceModel.Security.SecuritySessionClientSettings 1.SecurityRequestSessionChannel.CloseOutputSession(TimeSpan timeout) System.ServiceModel.Security.SecuritySessionClientSettings 1.ClientSecuritySessionChannel.CloseSession(TimeSpan timeout, Boolean& wasAborted) System.ServiceModel.Security.SecuritySessionClientSettings 1.ClientSecuritySessionChannel.OnClose(TimeSpan timeout) System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout) System.ServiceModel.Channels.ServiceChannel.OnClose(TimeSpan timeout) System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout) System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) System.ServiceModel.Channels.ServiceChannelProxy.ExecuteMessage(Object target, IMethodCallMessage methodCall) System.ServiceModel.Channels.ServiceChannelProxy.InvokeChannel(IMethodCallMessage methodCall) System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) System.ServiceModel.ICommunicationObject.Close(TimeSpan timeout) System.ServiceModel.ClientBase 1.System.ServiceModel.ICommunicationObject.Close(TimeSpan timeout) System.ServiceModel.ClientBase 1.Close() MemberPlus.MemberPlusShared.ServiceProxy`1.Dispose() MemberPlusDataLoads.DataLoads.ProcessData() MemberPlusDataLoads.DataLoads.DoProcessData() System.Threading.ThreadHelper.ThreadStart_Context(Object state) System.Threading.ExecutionContext.runTryCode(Object userData) System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) System.Threading.ThreadHelper.ThreadStart()

我也得到了以下错误:

基础连接已关闭:这是预计将维持生命被服务器关闭的连接。

堆栈跟踪:

System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason) System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) System.ServiceModel.Channels.ClientReliableChannelBinder 1.RequestClientReliableChannelBinder 1.OnRequest(TRequestChannel channel, Message message, TimeSpan timeout, MaskingMode maskingMode) System.ServiceModel.Channels.ClientReliableChannelBinder 1.Request(Message message, TimeSpan timeout, MaskingMode maskingMode) System.ServiceModel.Channels.ClientReliableChannelBinder 1.Request(Message message, TimeSpan timeout) System.ServiceModel.Security.SecuritySessionClientSettings`1.SecurityRequestSessionChannel.Request(Message message, TimeSpan timeout) System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) IDataLoadService.LaunchPackage(String sourceType, String packageName, Int32 fileId, Int32 ign) DataLoadServiceClient.LaunchPackage(String sourceType, String packageName, Int32 fileId, Int32 ign) MemberPlusDataLoads.DataLoads.ProcessData() MemberPlusDataLoads.DataLoads.DoProcessData() System.Threading.ThreadHelper.ThreadStart_Context(Object state) System.Threading.ExecutionContext.runTryCode(Object userData) System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) System.Threading.ThreadHelper.ThreadStart()

我的app.config: -

< binding name="WSHttpBinding_IDataLoadService" closeTimeout="00:12:00" openTimeout="00:12:00" receiveTimeout="00:12:00" sendTimeout="00:12:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> < readerQuotas maxDepth="32" maxStringContentLength="2147483647"

的MaxArrayLength = “2147483647” maxBytesPerRead = “4096” maxNameTableCharCount = “16384”/> < 的ReliableSession责令= “真” inactivityTimeout = “00:20:00” 启用= “假”/> < 安全模式= “消息”> < 运输clientCredentialType = “视窗” proxyCredentialType = “无” 境界= “”/> < 消息clientCredentialType = “视窗” negotiateServiceCredential = “真” algorithmSuite = “默认” establishSecurityContext =“true”/> < endpoint address =“http:// testappdbd/MemberPlusService/DataLoadService。SVC” 结合= “的wsHttpBinding” bindingConfiguration = “WSHttpBinding_IDataLoadService” 合同= “IDataLoadService” 名称= “WSHttpBinding_IDataLoadService”> < 身份> < 的UserPrincipalName值= “testappdbd \ ASPNET”/>

在Web.config:

< system.web> < httpRuntime maxRequestLength="2097151" executionTimeout="7200" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" /> < compilation debug="false" /> < wsHttpBinding> < binding name="DLBinding" maxReceivedMessageSize="2147483647" > < behavior name="DLServiceBehavior"> < serviceMetadata httpGetEnabled="true" /> < serviceDebug includeExceptionDetailInFaults="true" /> < dataContractSerializer maxItemsInObjectGraph="2147483647" /> < service name="DataLoadsService.ServiceImplementation.DataLoadsService" behaviorConfiguration ="DLServiceBehavior"> < endpoint address="" binding="wsHttpBinding" bindingConfiguration="DLBinding" contract="DataLoadsService.ServiceContract.IDataLoadService" /> < endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

我用的断点处调用服务,看WHA客户端的方法发生了,我发现客户端连接在超时(12分钟)设置的整个时间段内保持打开状态,但服务器端不会返回消息。

有关问题出现的位置和解决方案的任何想法?

回答

0

它可能是客户端和服务器上的配置不匹配。

尝试将所有配置置于绑定配置中,然后在服务器和客户端上使用相同的绑定配置。

相关问题