【发布时间】:2010-10-11 18:35:14
【问题描述】:
我有一个 asp.net 2.0 网站,其中托管了 WCF 服务,在 .NET 3.5 框架上运行。该网站仅使用集成 Windows 身份验证进行设置。 Web 服务器是 IIS 6,在 Windows 2003 Sp2(2 个服务器)上具有负载平衡。我无法使用完整的 url (http://myqa2.abcdefg.com/trxn/WCFTrxnService.svc) 访问 WCF 服务 (.svc)。另请注意,服务器配置有多个主机标头。该网站受 siteminder 保护。最初我遇到了一个错误
此集合已包含一个采用 http 方案的地址。此集合中的每个方案最多可以有一个地址。参数名称:项目
所以添加了以下配置条目
<serviceHostingEnvironment>
<baseAddressPrefixFilters>
<clear/>
<add prefix="http://myqa2.abcdefg.com"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
该错误消失了,但现在浏览器提示我登录。对于同一个网站,我可以访问 .aspx 页面。登录提示仅针对 .svc 文件显示。
这是我正在使用的配置文件中的绑定/端点。
<system.serviceModel>
<serviceHostingEnvironment>
<baseAddressPrefixFilters>
<clear/>
<add prefix="http://myqa2.abcdefg.com"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
<bindings>
<basicHttpBinding>
<binding name="IISIntegratedAuthBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="TestWCFFromSL.Web.WCFTrxnServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://myqa2.abcdefg.com/fmc/WCFNotesService.svc"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="TestWCFFromSL.Web.WCFTrxnService" behaviorConfiguration="TestWCFFromSL.Web.WCFTrxnServiceBehavior">
<endpoint
address="http://myqa2.abcdefg.com/trxn/WCFTrxnService.svc"
binding="basicHttpBinding"
bindingConfiguration="IISIntegratedAuthBinding"
contract="TestWCFFromSL.Web.IWCFTrxnService" />
</service>
</services>
<!--<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>-->
【问题讨论】:
标签: wcf internet-explorer authentication iis-6