gpt4 book ai didi

C# 提供的 URI scheme 'http' 无效;预计 'https'

转载 作者:太空狗 更新时间:2023-10-29 17:48:08 24 4
gpt4 key购买 nike

我在调用我的网络服务的方法时遇到这个错误,我不知道该怎么做了:s

异常详情如下:

{"The provided URI scheme 'http' is invalid; expected 'https'.\r\nParameter name: via"}

这是我的 App.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

<connectionStrings>
<add name="PowerWeb" connectionString="Data Source=MYSERVER;Initial Catalog=MYTABLE;User ID=MYUSER;Password=MYPW" providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>



<bindings>
<customBinding>
<binding name="ZWS_HARMONIZACAO">
<!-- WsdlImporter encountered unrecognized policy assertions in ServiceDescription 'urn:sap-com:document:sap:rfc:functions': -->
<!-- <wsdl:binding name='ZWS_HARMONIZACAO'> -->
<!-- <saptrnbnd:OptimizedXMLTransfer xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/">..</saptrnbnd:OptimizedXMLTransfer> -->
<!-- <saptrnbnd:OptimizedXMLTransfer xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/">..</saptrnbnd:OptimizedXMLTransfer> -->
<!-- <sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/">..</sapattahnd:Enabled> -->
<textMessageEncoding messageVersion="Soap11" />

<httpsTransport authenticationScheme="Basic" />


</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://mydomain:8080/sap/bc/srt/rfc/sap/zws_harmonizacao/010/zws_harmonizacao/zws_harmonizacao"
binding="customBinding" bindingConfiguration="ZWS_HARMONIZACAO"
contract="ServiceReference1.ZWS_HARMONIZACAO" name="ZWS_HARMONIZACAO" />
</client>

</system.serviceModel>
</configuration>

谁能帮帮我?提前致谢

最佳答案

您正在指定 httpsTransport在绑定(bind)中,但在您提供的端点定义中 http作为协议(protocol)。正如评论中所建议的那样,尝试更改 <endpoint address="http://...https

关于C# 提供的 URI scheme 'http' 无效;预计 'https',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21779311/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com