C# 无法通过https请求调用
我正在使用包含.svc文件并作为RESTAPI托管在https上的网站。我的问题是: 我的网站有C# 无法通过https请求调用,c#,jquery,wcf,C#,Jquery,Wcf,我正在使用包含.svc文件并作为RESTAPI托管在https上的网站。我的问题是: 我的网站有SVCUTIL.exeishttps://XXXXXXX但当我用https请求调用它时,它失败了,但在http请求中工作正常。我不想使用SSL证书 谢谢 这是我的网络配置设置: <serviceBehaviors> <behavior name="Mybehaviour"> <serviceMetadata httpsGetEnabled="tru
SVCUTIL.exe
ishttps://XXXXXXX
但当我用https请求调用它时,它失败了,但在http请求中工作正常。我不想使用SSL证书
谢谢
这是我的网络配置设置:
<serviceBehaviors>
<behavior name="Mybehaviour">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service behaviorConfiguration="Mybehaviour" name="PBUIService">
<endpoint address="https://XXXXXXXXXXXXXXX" behaviorConfiguration="PBBehaviour" binding="webHttpBinding" bindingConfiguration="wsHttpBindingSettings" contract="PBUIService">
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding"
contract="IMetadataExchange" />
</service>
</services>
我添加了以下几行,使其能够与https一起工作:
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="webBinding">
<security mode="Transport">
</security>
</binding>
</webHttpBinding>
</bindings>
你是对的,但在这种情况下,我必须在客户端使用SSL证书,但我不希望这样,因为我将其视为web api。您可以在WCF服务上启用跟踪(),以查看使用SSL时发生的情况。