找不到与绑定WebHttpBinding的端点的方案https匹配的基址

时间:2011-11-10 09:39:34

标签: asp.net web-services ssl https

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

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

它返回此错误

  

无法找到与方案https匹配的基地址   绑定WebHttpBinding的端点。注册的基地址方案   是[http]。

尝试过研究,但仍然无法做到, 下面是我的web.config IIS已经设置为绑定到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>

1 个答案:

答案 0 :(得分:0)

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

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

WCF Service Host settings