Gil*_*ouX 12 ssl wcf web-services
我现在已经好几个小时才弄明白这个问题了.
我有一个我在II7上托管的wcf服务,当我使用普通的http协议时,一切正常.
我添加了SSL功能,从那时起我无法从代码中访问它.我可以创建一个客户端但不能运行任何方法.
这就是我所拥有的
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttp0">
<security mode="Transport">
<transport realm ="" clientCredentialType="None" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="https://serverName.domname.local/WCFTest/MyWebServicec.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttp0" contract="SSLWebService.IMyWebService"
name="WSEP">
<identity>
<dns value="serverName.domname.local" />
</identity>
</endpoint>
</client>
</system.serviceModel>
Run Code Online (Sandbox Code Playgroud)
我为我的项目添加了一个服务引用
我就是这样用的
Dim client As MyWebServiceClient = New MyWebServiceClient()
Try
client.GetDocumentByDocID(5)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Run Code Online (Sandbox Code Playgroud)
这就是我得到的
在https://serverName.domname.local/WCFTest/MyWebService.svc上没有可以接受该消息的端点.这通常是由错误的地址或SOAP操作引起的.有关更多详细信息,请参阅InnerException(如果存在).
谁可以帮我这个事?我真的不明白发生了什么......
注意:我可以使用Internet Explorer正确访问Web服务(所以我猜我的证书没问题)
你说得对,
服务器端的sg错误。
这是我让它发挥作用的方法
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsHttpEndpointBinding">
<security mode="Transport">
<transport clientCredentialType ="None"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="App_WcfWebService.AppWebServiceBehavior" name="App_WcfWebService.AppWebService">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration ="wsHttpEndpointBinding" contract="App_WcfWebService.IAppWebService">
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="App_WcfWebService.AppWebServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata 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="true"/>
<serviceThrottling maxConcurrentSessions="90" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
16391 次 |
最近记录: |