我正在尝试将IIS配置为在两个IIS网站中托管一组二进制文件。所以我们希望能够访问网址:
internal.example.com和external.example.com设置为不同的IIS站点,以允许我们为它们分配不同的应用程序池。但是,当我向web.config添加HTTPS支持时,内部HTTP支持停止工作; http://internal.example.com/ADataService现在返回错误:
无法找到与绑定CustomBinding的端点匹配方案https的基址。注册的基地址方案是[http]。
以下是我们的web.config
的详细信息<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<bindings>
<customBinding>
<binding name="jsonCustomMapper">
<webMessageEncoding webContentTypeMapperType="Service.JSONCustomMapper, Service" />
<httpTransport manualAddressing="true" />
</binding>
<binding name="httpsjsonCustomMapper">
<webMessageEncoding webContentTypeMapperType="Service.JSONCustomMapper, Service" />
<httpsTransport manualAddressing="true" />
</binding>
</customBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="jsonBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="defaultBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="Service.Service" behaviorConfiguration="defaultBehavior">
<endpoint address="json" binding="customBinding" bindingConfiguration="jsonCustomMapper" behaviorConfiguration="jsonBehavior" contract="Service.IJSONService" />
<endpoint address="json" binding="customBinding" bindingConfiguration="httpsjsonCustomMapper" behaviorConfiguration="jsonBehavior" contract="Service.IJSONService" />
</service>
</services>
</system.serviceModel>
根据我的理解multipleSiteBindingsEnabled="true"
和HTTPS不混合,但我不明白他们将分享哪些资源?如果我们将internal.example.com和external.example.com托管在不同的应用程序池中,我认为他们会有进程隔离?
答案 0 :(得分:0)
似乎在网站上为“internal.example.com”添加了HTTPS证书解决了这个问题。注意:如果没有此证书,我们无法通过HTTP或HTTPS访问internal.example.com,并且证书可以正常运行。