报错信息如下
解决方式
web service接口
Services目录下找到访问接口的同名配置文件(没有同名配置文件找公共配置web.config),参考以下配置:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="U9SrvTypeBehaviors">
<serviceMetadata httpsGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="UFIDA.U9.Sn.BatchCreateSnSVStub" behaviorConfiguration="U9SrvTypeBehaviors">
<endpoint contract="UFIDA.U9.Sn.IBatchCreateSnSV" binding="basicHttpBinding" />
</service>
</services>
<bindings>
<basicHttpBinding>
<binding>
<security mode="Transport"></security>
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
轻量型接口RestServices
RestServices目录下找到访问接口的同名配置文件(没有同名配置文件找公共配置web.config),参考以下配置:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="U9SrvTypeBehaviors">
<serviceMetadata httpsGetEnabled="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="U9RestSrvBehaviors">
<enableWebScript />
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service name="UFIDA.U9.Cust.HZM.DataCollection.TokenSV.GetTokenServiceStub" behaviorConfiguration="U9SrvTypeBehaviors">
<endpoint address="" behaviorConfiguration="U9RestSrvBehaviors" binding="webHttpBinding" contract="UFIDA.U9.Cust.HZM.DataCollection.TokenSV.IGetTokenService" />
</service>
</services>
<bindings>
<webHttpBinding>
<binding>
<security mode="Transport"></security>
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
评论 (0)