WCF:调用方未由服务器进行身份验证
错误描述:
1. WCF:调用方未由服务器进行身份验证
2. 无法处理消息。这很可能是因为操作“http://tempuri.org/ISCCLSvc/GetCarriersByWareHouse”不正确,或因为消息包含无效或过期的安全上下文令牌,或因为绑定之间出现不匹配。如果由于未处于活动状态导致服务中止了该通道,则安全上下文令牌无效。若要防止服务永久中止闲置会话,请增加服务终结点绑定上的接收超时。
3.或并发测试时,高并发出现问题2,实际案例:公司测试部门结果是并发到50就会出现问题2错误,并且平均响应时间也会很慢
解决后结果:
接口测试并发100无问题,并且平均响应时间减小5倍时间!
解决方法:
主要修改红色文本区域
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="NoneSecurity"
maxBufferPoolSize="12000000" maxReceivedMessageSize="12000000" useDefaultWebProxy="false">
<readerQuotas maxStringContentLength="12000000" maxArrayLength="12000000"/>
<security mode="None"/>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="WcfService2.Service1" behaviorConfiguration="WcfService2.Service1Behavior">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="NoneSecurity" contract="WcfService2.IService1">
<!--
部署时,应删除或替换下列标识元素,以反映
在其下运行部署服务的标识。删除之后,WCF 将
自动推导相应标识。
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WcfService2.Service1Behavior">
<!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false 并删除上面的元数据终结点-->
<serviceMetadata httpGetEnabled="true"/>
<!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息-->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
客户端将security配置改为<security mode="None"/>
详细错误信息:
- <p></p><p>System.ServiceModel.Security.MessageSecurityException was unhandled
- Message=An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
- Source=mscorlib
- StackTrace:
- Server stack trace:
- at System.ServiceModel.Security.SecuritySessionClientSettings`1.SecurityRequestSessionChannel.ProcessReply(Message reply, TimeSpan timeout, SecurityProtocolCorrelationState correlationState)
- at System.ServiceModel.Security.SecuritySessionClientSettings`1.SecurityRequestSessionChannel.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 ApiStressTest.SCCL.ISCCLSvc.GetCarriersByWareHouse(TransModel tm)
- at ApiStressTest.SCCL.SCCLSvcClient.GetCarriersByWareHouse(TransModel tm) in D:\SCCL\ApiTest.new\ApiStressTest\Service References\SCCL\Reference.cs:line 198
- at ApiStressTest.ServiceWrapper.ServiceAPIWrapperMethod(Object stateInfo) in D:\SCCL\ApiTest.new\ApiStressTest\SCCLProgram.cs:line 416
- at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
- at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
- at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
- at System.Threading.ThreadHelper.ThreadStart(Object obj)
- InnerException: System.ServiceModel.FaultException
- Message=无法处理消息。这很可能是因为操作“http://tempuri.org/ISCSvc/GetHouse”不正确,或因为消息包含无效或过期的安全上下文令牌,或因为绑定之间出现不匹配。如果由于未处于活动状态导致服务中止了该通道,则安全上下文令牌无效。若要防止服务永久中止闲置会话,请增加服务终结点绑定上的接收超时。
- InnerException:
WCF:调用方未由服务器进行身份验证的更多相关文章
- 解决WCF 调用方未由服务器进行身份验证或消息包含无效或过期的安全上下文令牌
错误描述: 1. WCF:调用方未由服务器进行身份验证 2. 无法处理消息.这很可能是因为操作“http://tempuri.org/ISCCLSvc/GetCarriersByWareHouse”不 ...
- 关于WCF报错之调用方未由服务器进行身份验证
在我们部署好WCF服务以后,调用WCF服务会出现”调用方未由服务器进行身份验证”的错误.这个错误是怎么造成的呢? 通常我们在创建WCF后,用本机调试,一切正常,没有任何问题.其实用本机测试的时候,服务 ...
- 解决WCF跨机器调用时发生“调用方未由服务进行身份验证”的错误
1.服务器端Web.config配置文件,增加如下部分: <system.serviceModel> <bindings> <wsHttpBinding> < ...
- win7远程服务器发生身份验证错误,要求的函数不受支持
远程服务器发生身份验证错误,要求的函数不受支持,远程登录服务器以前都是正常的,今天登录远程桌面就一直是这样的错误.记录一下解决方法. 方法一:卸载补丁KB41037181.打开控制面板,找到“程序和功 ...
- 错误提示:通过 Web 服务器的身份验证的用户无权打开文件系统上的文件
//win7中iis配置好了可是网页打不开,为什么.? //错误提示:通过 Web 服务器的身份验证的用户无权打开文件系统上的文件 //解决办法1.右键单击你的网站根目录文件夹,如wwwroot文件夹 ...
- PushSharp 由于远程方已关闭传输流,身份验证失败。
前段时间用到了PushSharp给APNS发推送,但是用的时候遇见很诡异的事情,每次第一次运行的时候能成功发送到 但是接下来就无限的提示“由于远程方已关闭传输流,身份验证失败. “ 然后我就各种找原因 ...
- win7 远程连接服务器出现身份验证错误,又找不到加密Oracle修正
今天想用远程桌面连接登录服务器,结果,弹出一个错误的提示框:发生身份验证错误,要求的函数不受支持. 然后在网上找了相关的教程,基本上所有的方法都是如下所示: 策略路径:"计算机配置" ...
- win7 远程连接服务器出现身份验证错误,且找不到加密Oracle修正
用远程桌面连接登录服务器,结果,弹出一个错误的提示框:发生身份验证错误,要求的函数不受支持. 然后在网上找了相关的教程,基本上所有的方法都是如下所示: 策略路径:"计算机配置"-& ...
- windows7远程连接服务器出现身份验证错误,又找不到加密Oracle修正
把以下内容复制到文本中, Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Cur ...
随机推荐
- python自动化Traceback (most recent call last):报错
今天使用python.然而遇见了Traceback (most recent call last):的报错.抓狂的一笔.有说path写错的,有说是...网上查到的资料也是很少.后来突然发现,页面上我暂 ...
- python的模块!
以下是对模块的理解,和总结 <1>模块是什么 模块是这样用的 import os 这就是导入了os模块 这和c语言里的#include<stdio.h>导入方式是一样的 导入了 ...
- javascript初始笔记
1.在html中使用点击事件: <button type="button" onclick="myclick()">click me<butt ...
- icon的使用
在前端页面设计时,不免使用的就是图标,下面就我使用图标icon分享一下经验 1.icon插件,现在比较好的是bootstrap自带的,fontawesome,链接地址:http://fontaweso ...
- HomeBrew 安装 PHP7.1(开发笔记)
HomeBrew 安装 PHP7.1 $ brew update $ brew tap homebrew/dupes $ brew tap homebrew/php $ brew update $ b ...
- 转:apache 的mod-status
最近发现在apache的监控方面,apache 2开始自带的apache mod-status其实是个不错的工具,下面摘录并笔记之: 如果是linux的话,可以这样设置: 在httpd.conf中添加 ...
- Windows上安装MongoDB步骤
事前准备: 1.在mongoDB官网下载.msi文件,我下的是社区版,下载地址:https://www.mongodb.com/download-center#community 2.点击msi文件安 ...
- javascript基础(一)变量
原文http://pij.robinqu.me/ 预定义的全局变量 arguments encodeURI Infinity Array encodeURIComponent isFinite Boo ...
- POJ 2599 A funny game#树形SG(DFS实现)
http://poj.org/problem?id=2599 #include<iostream> #include<cstdio> #include<cstring&g ...
- HTTP Request GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE Methods
注:本文为个人学习摘录,原文地址为:http://javaeedevelop.iteye.com/blog/1725299 An HTTP request is a class consisting ...