在httpTransport中找不到authenticationScheme

时间:2012-06-22 10:15:30

标签: wcf silverlight authentication service

我正在尝试将Windows身份验证用于服务,并阅读了几篇帖子,只是说我需要添加

httpTransport = authenticationScheme="Negotiate"

但是我只是收到消息'未声明authenicationScheme属性'

任何人都可以解释我如何找到这个,或者是否有其他方法可以将Windows身份验证授予自定义服务。

<customBinding>
            <binding name="CustomBinding_AFDiscoveryService">
                <binaryMessageEncoding />
                <httpTransport  authenticationScheme="Negotiate" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
              </binding>
        </customBinding>

非常感谢

克里斯

1 个答案:

答案 0 :(得分:0)

这应该工作得很好。你在哪里收到这条消息?

<system.serviceModel>
    <bindings>
        <customBinding>
            <binding name="CustomBinding_AFDiscoveryService">
                <binaryMessageEncoding />
                <httpTransport  authenticationScheme="Negotiate" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
            </binding>
        </customBinding>
    </bindings>
    <services>
        <service name="Host.Service1">
            <endpoint address="" binding="customBinding" bindingConfiguration="CustomBinding_AFDiscoveryService" contract="Host.IService1">
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
            <host>
                <baseAddresses>
                    <add baseAddress="http://localhost:8732/Design_Time_Addresses/Host/Service1/" />
                </baseAddresses>
            </host>
        </service>
    </services>
</system.serviceModel>