0

我知道他们中的许多人都遇到了同样的错误。我尝试了这里给出的所有可能的答案,但我仍然收到此错误。

我的 Web.config 服务。

    <serviceBehaviors>
        <behavior name="AjaxServiceHttpsBehavior">
          <serviceMetadata httpsGetEnabled ="true"/>
        </behavior>
      </serviceBehaviors>
    <endpointBehaviors>
        <behavior name="AjaxServiceAspNetAjaxBehavior">
        <enableWebScript />
        </behavior>
    </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    <services>
      <service name="AjaxService"  behaviorConfiguration="AjaxServiceHttpsBehavior">
        <host>
          <baseAddresses>
            <add baseAddress="https://servername/websitefolder" />
          </baseAddresses>
        </host>
    <endpoint address="" behaviorConfiguration="AjaxServiceAspNetAjaxBehavior"  binding="webHttpBinding" bindingConfiguration="webHttpsBinding" contract="AjaxService" />
        </service>
    </services>
        <bindings>
   <webHttpBinding>
      <binding name="webHttpsBinding">
        <security mode="Transport"></security>
      </binding>
    </webHttpBinding>
   <basicHttpBinding>

该服务位于“https://servername/websitefolder/AjaxService.svc”,并且 ssl 配置正确。

我的基本地址是错误的吗?我只有这个服务的一个端点。我尝试了所有可能的组合,但仍然收到此错误。

4

2 回答 2

2

I ran into the same issue with wsHttpBinding, and found it wasn't a problem with my base address at all but what I had defined in my element

 <wsHttpBinding><binding name="wsHttpBinding_Administration">
      <security mode="Message"> <!-- changed this to "message" -->
        <message clientCredentialType="UserName" />
      </security>
    </binding>
  </wsHttpBinding>
于 2012-12-06T19:27:46.273 回答
0

检查您的网站在 IIS 内的绑定。应该在那里添加 https 绑定。

于 2012-06-27T10:19:22.503 回答