Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/314.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 无法通过https请求调用_C#_Jquery_Wcf - Fatal编程技术网

C# 无法通过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

我正在使用包含.svc文件并作为RESTAPI托管在https上的网站。我的问题是: 我的网站有
SVCUTIL.exe
is
https://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时发生的情况。