在 ServiceModel 客户端配置部分中,找不到引用协定“PmWs.PmWebServiceSoap”的默认终结点元素
2015-08-10 10:12
567 查看
System.Exception: ConfigManager.LoadConfigurationFromDb ServiceFactory.GetPmWebService 在 ServiceModel 客户端配置部分中,找不到引用协定“PmWs.PmWebServiceSoap”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。 ---> System.Exception: ServiceFactory.GetPmWebService 在 ServiceModel 客户端配置部分中,找不到引用协定“PmWs.PmWebServiceSoap”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。 ---> System.InvalidOperationException: 在 ServiceModel 客户端配置部分中,找不到引用协定“PmWs.PmWebServiceSoap”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。 在 System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName) 在 System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName, Configuration configuration) 在 System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName) 在 System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address) 在 System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress) 在 System.ServiceModel.ConfigurationEndpointTrait`1.CreateSimplexFactory() 在 System.ServiceModel.ConfigurationEndpointTrait`1.CreateChannelFactory() 在 System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait) 在 System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef() 在 System.ServiceModel.ClientBase`1..ctor() 在 PmLib.PmWs.PmWebServiceSoapClient..ctor() 在 PmLib.Business.ServiceFactory.GetPmWebService() --- 内部异常堆栈跟踪的结尾 --- 在 PmLib.Business.ServiceFactory.GetPmWebService() 在 PmLib.Business.DataManager..ctor() 在 PmLib.Business.ConfigManager.LoadConfigurationFromDb(String MacAddress) --- 内部异常堆栈跟踪的结尾 --- 在 PmLib.Business.ConfigManager.LoadConfigurationFromDb(String MacAddress) 在 PmWebService.GetExistList(String mac) 位置 e:\work\\WebDev\xwx_szrcb\Center\WebPages\eMBS\App_Code\PmWebService.cs:行号 211
错误如上,解决方式很简单。在 web.config ServiceModel 文件加入 Soap 协议
<system.serviceModel> <bindings> <basicHttpBinding> <binding name="KioskServiceSoap" /> <binding name="TaskSoap" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binding> <binding name="Service1Soap" /> <binding name="ImageServiceSoap" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binding> <binding name="PmWebServiceSoap" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://192.168.1.231/WebKioskService/KioskService.asmx" binding="basicHttpBinding" bindingConfiguration="KioskServiceSoap" contract="refCenterKioskService.KioskServiceSoap" name="KioskServiceSoap" /> <endpoint address="http://105.1.1.142/FDSService/Task.asmx" binding="basicHttpBinding" bindingConfiguration="TaskSoap" contract="ClientTask.TaskSoap" name="TaskSoap" /> <endpoint address="http://105.1.1.142/advance/Service1.asmx" binding="basicHttpBinding" bindingConfiguration="Service1Soap" contract="ClientService1.Service1Soap" name="Service1Soap" /> <endpoint address="http://105.1.1.142/FDSService/ImageService.asmx" binding="basicHttpBinding" bindingConfiguration="ImageServiceSoap" contract="CallClient_ImageService.ImageServiceSoap" name="ImageServiceSoap" /> <endpoint address="http://192.168.1.231/PmWebService.asmx" binding="basicHttpBinding" bindingConfiguration="PmWebServiceSoap" contract="PmWs.PmWebServiceSoap" name="PmWebServiceSoap" /> </client> </system.serviceModel>
相关文章推荐
- PMP杂谈--项目管理计划
- PMP杂谈--配置管理系统和变更控制系统
- 腾讯手机QQ产品经理丨我做产品的「失败」体验
- BACnetScan读BO多个属性报文详解
- BACnetScan读BI多个属性——请求报文和应答报文解析
- CMVS-PMVS配置
- 关于项目管理专业人士(PMP)认证考试5P的个人心得
- SPM paired t-test步骤
- SPM12manual,统计部分(8-10)笔记
- RunLoop学习笔记,从CF层面了解由于CFRunLoopMode机制
- couldn't install npm packages from npm-shrinkwrap
- 用yum工具下载一个rpm包
- 产品经理(五岁以下儿童)myVegas Slots排名上升的秘密
- rpm包下载地址
- npm 慢
- LeapMotion c#获取骨骼坐标
- 你想成为50W年薪的优秀产品经理吗?
- 透视:农民代码,你需要了解的产品经理
- 【面经】阿里、腾讯、百度产品经理面试录:我是怎样同时拿到BAT Offer的?
- pmap