【问题标题】:WCF Streaming on service with Windows Authentication Endpoint使用 Windows 身份验证端点的服务上的 WCF 流式传输
【发布时间】:2012-02-12 04:51:56
【问题描述】:

我有一个带有两个端点的 WCF 服务,由下面的配置文件定义:

 <system.serviceModel>
        <services>
          <service name="SyncService" behaviorConfiguration="SyncServiceBehavior">
            <endpoint name="Data" address="Data" binding="basicHttpBinding" bindingConfiguration="windowsAuthentication" contract="ISyncService"/>
            <endpoint name="File" address="File" binding="basicHttpBinding" bindingConfiguration="httpLargeMessageStream" contract="ISyncService"/>
            <endpoint address="mex" binding="webHttpBinding" bindingConfiguration="windowsAuthentication" contract="IMetadataExchange"/>
          </service>
        </services>
        <bindings>
          <basicHttpBinding>
            <binding name="httpLargeMessageStream" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed" messageEncoding="Mtom" />
            <binding name="windowsAuthentication" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
              <security mode="TransportCredentialOnly">
                <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""></transport>
                <message algorithmSuite="Default" clientCredentialType="UserName"/>
              </security>
            </binding>
          </basicHttpBinding>
          <webHttpBinding>
            <binding name="windowsAuthentication">
              <security mode="TransportCredentialOnly">
                <transport clientCredentialType="Windows"></transport>
              </security>
            </binding>
          </webHttpBinding>
      </bindings>
        <behaviors>
          <serviceBehaviors>
            <behavior name="SyncServiceBehavior">
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="true"/>
              <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"></serviceHostingEnvironment>
      </system.serviceModel>

我想对 Data 端点使用 windows 身份验证,但最近发现您不能使用 windows 身份验证来通过 HTTP 进行流式传输。我删除了 File 端点的安全元素,但仍然收到以下错误:

HTTP 请求流不能与 HTTP 结合使用 验证。禁用请求流或指定匿名 HTTP 身份验证。参数名称:绑定元素

是否可以让同一服务上的两个端点像这样使用不同的身份验证方法?为什么我不能使用 Windows 身份验证进行流式传输?

我也尝试了这个帖子中的建议,但无济于事:

Which authentication mode of basichhtpbinding can be used to secure a WCF Service using Streaming?

【问题讨论】:

    标签: wcf


    【解决方案1】:

    很遗憾,这不受支持。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-02-22
      • 2012-03-23
      • 2010-11-20
      • 1970-01-01
      • 1970-01-01
      • 2012-04-15
      • 1970-01-01
      • 2013-08-26
      相关资源
      最近更新 更多