518*_*ohn 1 wcf binding alert endpoint svc
我尝试从sharpoint调用我的自定义svc文件时收到此错误.我在这里发布了我的web.config文件,你们可以告诉我这个错误吗?
我试图在sharepoint中拥有我的自定义web服务,所以我创建了一个项目,但是由于这个错误,我无法浏览我的web方法.
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="AlertWcfService.CustomServiceBehaviour"
name="AlertWcfService.AlertService">
<endpoint address="http://localhost:2000/" binding="basicHttpBinding" bindingConfiguration="basicHttpBindingConfiguration"
contract="AlertWcfService.IAlertService" >
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:2000/"></add>
</baseAddresses>
</host>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBindingConfiguration">
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Certificate" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="AlertWcfService.CustomServiceBehaviour">
<!--<serviceMetadata httpsGetEnabled="false"/>-->
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="false"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Run Code Online (Sandbox Code Playgroud)
错误是您没有使用HTTPS,但是您使用的是MEX绑定而不是HTTP.要解决此问题,请更改此行:
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
Run Code Online (Sandbox Code Playgroud)
至
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7510 次 |
| 最近记录: |