gpt4 book ai didi

asp.net - 找不到与具有绑定(bind) WebHttpBinding 的端点的方案 https 匹配的基地址

转载 作者:太空宇宙 更新时间:2023-11-03 13:43:17 25 4
gpt4 key购买 nike

我正在尝试使用 https 设置 SightMax 实时聊天,但是当请求下面的 url 时

https://livechat.domain.com/Live-Chat/agentinterfacejson.svc/ssl/chat/RequestSurvey

它返回这个错误

Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http].

尝试过研究,但仍然无法解决问题,下面是我的 web.configIIS 已设置为绑定(bind)到 https。

<bindings>
<customBinding>
<binding name="jsonpBinding">
<jsonpMessageEncoding/>
<httpTransport manualAddressing="true"/>
</binding>
<binding name="jsonpBindingSsl">
<jsonpMessageEncoding/>
<httpsTransport manualAddressing="true"/>
</binding>
</customBinding>
<webHttpBinding>
<binding name="jsonBinding" maxReceivedMessageSize="52428800">
<readerQuotas maxDepth="52428800" maxStringContentLength="52428800" maxArrayLength="52428800"/>
</binding>
<binding name="sslJsonBinding">
<security mode="Transport"/>
</binding>
<binding name="jsonpBindingSsl">
<security mode="Transport"/>
</binding>
</webHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJsonBehavior" name="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJson">
<endpoint address="chat" behaviorConfiguration="jsonEndpointBehavior" binding="webHttpBinding" bindingConfiguration="jsonBinding" name="jsonChat" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat"/>
<endpoint address="site" behaviorConfiguration="jsonEndpointBehavior" binding="webHttpBinding" bindingConfiguration="jsonBinding" name="jsonSite" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite"/>
<!--Uncomment in order to enable SSL-->
<endpoint address="ssl/chat" behaviorConfiguration="jsonEndpointBehavior"
binding="webHttpBinding" bindingConfiguration="sslJsonBinding"
name="jsonChatSsl" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat" />
<endpoint address="ssl/site" behaviorConfiguration="jsonEndpointBehavior"
binding="webHttpBinding" bindingConfiguration="sslJsonBinding"
name="jsonSiteSsl" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite" />
</service>

<service behaviorConfiguration="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJsonpBehavior" name="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJsonp">
<endpoint address="chat" behaviorConfiguration="jsonpEndpointBehavior" binding="customBinding" bindingConfiguration="jsonpBinding" name="jsonpChat" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat"/>
<endpoint address="site" behaviorConfiguration="jsonpEndpointBehavior" binding="customBinding" bindingConfiguration="jsonpBinding" name="jsonpSite" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite"/>
<!--Uncomment in order to enable SSL-->
<endpoint address="ssl/chat" behaviorConfiguration="jsonpEndpointBehavior"
binding="customBinding" bindingConfiguration="jsonpBindingSsl"
name="jsonChatSsl" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat" />
<endpoint address="ssl/site" behaviorConfiguration="jsonpEndpointBehavior"
binding="customBinding" bindingConfiguration="jsonpBindingSsl"
name="jsonSiteSsl" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite" />
</service>
</services>

对此有什么想法吗?谢谢

我已经尝试将基地址放在每个服务上,但仍然没有成功。

<services>
<service behaviorConfiguration="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJsonBehavior" name="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJson">
<host>
<baseAddresses>
<add baseAddress="https://livechat.domain.com/Live-Chat/agentinterfacejson.svc/"/>
</baseAddresses>
</host>
<endpoint address="chat" behaviorConfiguration="jsonEndpointBehavior" binding="webHttpBinding" bindingConfiguration="jsonBinding" name="jsonChat" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat"/>
<endpoint address="site" behaviorConfiguration="jsonEndpointBehavior" binding="webHttpBinding" bindingConfiguration="jsonBinding" name="jsonSite" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite"/>
<!--Uncomment in order to enable SSL-->
<endpoint address="ssl/chat" behaviorConfiguration="jsonEndpointBehavior"binding="webHttpBinding" bindingConfiguration="sslJsonBinding"name="jsonChatSsl" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat" />
<endpoint address="ssl/site" behaviorConfiguration="jsonEndpointBehavior"binding="webHttpBinding" bindingConfiguration="sslJsonBinding"name="jsonSiteSsl" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite" />
</service>
<service behaviorConfiguration="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJsonpBehavior" name="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJsonp">
<host>
<baseAddresses>
<add baseAddress="https://livechat.domain.com/Live-Chat/agentinterfacejson.svc/"/>
</baseAddresses>
</host>
<endpoint address="chat" behaviorConfiguration="jsonpEndpointBehavior" binding="customBinding" bindingConfiguration="jsonpBinding" name="jsonpChat" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat"/>
<endpoint address="site" behaviorConfiguration="jsonpEndpointBehavior" binding="customBinding" bindingConfiguration="jsonpBinding" name="jsonpSite" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite"/>
<!--Uncomment in order to enable SSL-->
<endpoint address="ssl/chat" behaviorConfiguration="jsonpEndpointBehavior"binding="customBinding" bindingConfiguration="jsonpBindingSsl"name="jsonChatSsl" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat" />
<endpoint address="ssl/site" behaviorConfiguration="jsonpEndpointBehavior"binding="customBinding" bindingConfiguration="jsonpBindingSsl"name="jsonSiteSsl" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite" />
</service>
</services>

最佳答案

您似乎缺少 BaseAddress,而您的端点地址是相对的。

<baseAddresses>
<add baseAddress="https://livechat.domain.com/Livechat/agentinterfacejson.svc" />
</baseAddresses>

WCF Service Host settings

关于asp.net - 找不到与具有绑定(bind) WebHttpBinding 的端点的方案 https 匹配的基地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8077506/

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