WebService 错误:无法加载协定为xxx的终结点配置部分,因为找到
发布时间:2020-12-16 23:02:39 所属栏目:安全 来源:网络整理
导读:? 转载: 当在vs 2008中添加服务引用后,如果“更新”服务引用,或“删除”该服务引用后再次加入后,在运行时会出现此错误。这是因为在“更新/删除”服务引用时,app.config文件并不会自动修改,在“更新”或再次“加入”后,会生成两个同样的“endpoint”,
?
转载:
当在vs 2008中添加服务引用后,如果“更新”服务引用,或“删除”该服务引用后再次加入后,在运行时会出现此错误。这是因为在“更新/删除”服务引用时,app.config文件并不会自动修改,在“更新”或再次“加入”后,会生成两个同样的“endpoint”,需要手工删除掉原有的才能正常运行。 第一次加入后的app.config ?? <client> <endpoint address="http://localhost/WSTest/TestDalWS.asmx" binding="basicHttpBinding" bindingConfiguration="TestDalWSSoap6" contract="WSServer.TestDalWSSoap" name="TestDalWSSoap6" /> </client> 对应的 <bing> 也只有一个。 ? <bindings> <basicHttpBinding> <binding name="TestDalWSSoap6" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm=""> <extendedProtectionPolicy policyEnforcement="Never" /> </transport> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> </bindings> ? 在“更新”或再次“加入”后,会生成两个同样的“endpoint”,需要手工删除掉原有的才能正常运行。 原创: 或者有另外一种解决方法 <endpoint address="http://123.15.40.85:8079/DataUpLoadService.asmx" binding="basicHttpBinding" bindingConfiguration="DataUpLoadServiceSoap" contract="ServiceReference1.DataUpLoadServiceSoap" name="DataUpLoadServiceSoap" />???? 删除一个就行了 ? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |