我正在尝试将 IIS 配置为在两个 IIS 网站中托管一组二进制文件。所以我们希望能够访问这些网址:
- http://external.example.com/ADataService
- https://external.example.com/ADataService
- http://internal.example.com/ADataService
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 托管在不同的应用程序池中,我认为它们会有进程隔离吗?