【发布时间】:2016-03-25 14:44:04
【问题描述】:
<?xml version="1.0" ?>
<configuration>
<connectionStrings>
<add name="SqlServerConnectionString" connectionString=""/>
<add name="OracleConnectionString" connectionString="user id=DBGDEV;password=123;data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=****.r..****)(PORT=1584))(CONNECT_DATA=(SERVICE_NAME=****)))" />
</connectionStrings>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true">
</compilation>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehavior">
<serviceMetadata httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="httpEndpointBehavour">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service name="Implementation.AccountService" behaviorConfiguration="serviceBehavior">
<endpoint address="" binding="webHttpBinding" contract="Contract.IAccountService" behaviorConfiguration="httpEndpointBehavour"bindingConfiguration="webHttpBinding" />
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="WCFsoap" 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">
<security mode="Transport">
<transport clientCredentialType="Basic" proxyCredentialType="Basic"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="WCFsoap1" 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">
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>
</binding>
</basicHttpBinding>
<webHttpBinding>
<binding name="webHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</webHttpBinding>
</bindings>
<client>
<endpoint address="https://test.myservice.com/rally_generic_ws.do?SOAP"
binding="basicHttpBinding" bindingConfiguration="WCFsoap"
contract="serviceName.WCFsoap" name="WCFsoap" />
</client>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</modules>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
</handlers>
</system.webServer>
<system.codedom>
</system.codedom>
<runtime>
</runtime>
</configuration>
以上代码属于Service web.config。
错误“没有在“https://test.myservice.com/rally_generic_ws.do?SOAP”处侦听可以接受消息的端点这通常是由不正确的地址或 SOAP 操作引起的”。 这个错误可能是什么原因。我因此被阻止。请指导我。
下一期
当我在 wcf 测试客户端中添加 https 作为服务引用时,在我的 web.config 中进行某些更改后,我收到以下错误。
无法从https://server-uat:8090/service.svc 获取元数据。
如果这是您有权访问的 Windows (R) Communication Foundation 服务,请检查您是否已在指定地址启用元数据发布。
有关启用元数据发布的帮助,请参阅位于 http://go.microsoft.com/fwlink/?LinkId=65455 的 MSDN 文档。
WS 元数据交换错误 URI:https://server-uat:8090/service.svc
元数据包含无法解析的引用:“http://192.168.0.15:8090/service.svc”。
https://test.myservice.com/rally_generic_ws.do?SOAP 没有端点监听
可以接受该消息。这通常是由不正确的地址或 SOAP 操作引起的。
有关详细信息,请参阅内部异常(如果存在)。
远程服务器返回错误:(404) Not Found.HTTP GET Error URI: https://server-uat:8090/service.svc
URL https://server-uat:8090/service.svc 处的文档未被识别为已知文档类型。每种已知类型的错误消息可能会帮助您解决问题:-
来自'https://server-uat:8090/service.svc'的报告是'无法识别文档格式(内容类型为'text/html; charset=UTF-8')。'.- 无法解析远程名称:'**********'- 来自 'WSDL Document' 的报告是 '无法识别文档格式(内容类型为 'text/html; charset=UTF-8 ').'.- 来自“XML Schema”的报告是“无法识别文档格式(内容类型为 'text/html; charset=UTF-8')。”。
这是我尝试将服务添加到 wcf 测试客户端时遇到的错误。这个错误的原因是什么。如何摆脱这个错误。
据我所知,我猜客户端在服务器中找不到请求的操作。我需要更改 web.config 吗??
【问题讨论】:
-
在 web config 端点中是否使用 http 而不是 https?
-
在客户端地址中,我提供了外部 wsdl url(test.myservicenow.com/rally_generic_ws.do?SOAP),我正在评估它以获得所需的输出。由于 url 在 https 中并且我已经在浏览器中运行了 url使用 https,所以它不应该是 http。url 使用代理和密码保护。所以我已经在我的 web 服务代码中传递了所需的代理和密码。
标签: web-services wcf soap web-config iis-6