【发布时间】:2015-10-19 08:02:46
【问题描述】:
我有一个服务部署在 IIS 和 defaultwebsite 节点下的服务 ->Example.SampleService 下面我有一个名为 SampleService.svc 的 SVC 文件 所以,当我在 IE 中像http://localhost/Example.SampleService/SampleService.svc 一样浏览它时,brwoser 显示它很好。 我尝试通过添加与在 SOAPUI 中创建的项目具有相同地址的 wsdl 来使用 SOAP UI 对其进行测试,但是当我提交请求时,我收到如下错误: HTTP/1.1 404 未找到 缓存控制:私有 服务器:Microsoft-IIS/7.5 X-AspNet-版本:4.0.30319 X-Powered-By: ASP.NET 日期:2015 年 10 月 19 日星期一 07:54:36 GMT 内容长度:0
web.confg 如下:
<bindings>
<wsHttpBinding>
<binding name="wsUserName" maxReceivedMessageSize="262144" receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00">
<security mode="Transport">
<!--<message clientCredentialType="UserName" negotiateServiceCredential="false" establishSecurityContext="false" />-->
<transport clientCredentialType="None" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="Example.SampleService.SampleService">
<host>
<baseAddresses>
<add baseAddress="http://localhost/Example.SampleService/" />
</baseAddresses>
</host>
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsUserName" contract="Example.IVaultService" />
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!--To avoid disclosing metadata information, set the values below to false before deployment-->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<!--To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information-->
<serviceDebug includeExceptionDetailInFaults="false"/>
<serviceCredentials useIdentityConfiguration="true">
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
【问题讨论】:
-
您是否先使用 WCF 测试客户端 (msdn.microsoft.com/en-us/library/bb552364.aspx) 对其进行了测试?这是最明显的方式,在尝试 SoapUI 之前
标签: wcf endpoint base-address