首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WCF wsHttpBinding安全错误

WCF wsHttpBinding安全错误
EN

Stack Overflow用户
提问于 2012-08-30 20:41:10
回答 1查看 840关注 0票数 2

我有一个WCF托管在Windows服务中,并使用用户域帐户运行。

我在域中的所有客户端(控制台应用程序或Web应用程序)都工作得很好。

我有一个控制台应用程序,它不在域中,无法工作。

下面是错误:

代码语言:javascript
复制
Exception non gérée : System.ServiceModel.Security.SecurityNegotiationException:
L'appelant n'a pas été authentifié par le service. ---> System.ServiceModel.Fau
ltException: The request for security token could not be satisfied because authe
ntication failed.

以下是WCF服务器配置:

代码语言:javascript
复制
      <wsHttpBinding>
        <binding name="TransactionalBind" transactionFlow="true"/>
      </wsHttpBinding>

[...]

    <endpoint address="http://machine.domain.fr:1083/MyService/"
              binding="wsHttpBinding"
              bindingConfiguration="TransactionalBind"
              contract="MyService.IMyService"/>
[...]

    <behavior name="MyBahavior">
      <serviceMetadata httpGetEnabled="True"/>
      <serviceDebug includeExceptionDetailInFaults="True" />
      <dataContractSerializer maxItemsInObjectGraph="2147483647" />
    </behavior>

以下是我的客户端配置:

代码语言:javascript
复制
        <wsHttpBinding>
            <binding name="WSHttpBinding_IMyService" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                bypassProxyOnLocal="false" transactionFlow="true" hostNameComparisonMode="StrongWildcard"
                maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                allowCookies="false">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <reliableSession ordered="true" inactivityTimeout="00:10:00"
                    enabled="false" />
                <security mode="Message">
                    <transport clientCredentialType="Windows" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="Windows" negotiateServiceCredential="true"
                        algorithmSuite="Default" />
                </security>
            </binding>
        </wsHttpBinding>
[...]

        <client>
            <endpoint address="http://machine.domain.fr:1083/MyService/"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IMyService"
                contract="wsArchi.IMyService" name="WSHttpBinding_IMyService">
            </endpoint>
        </client>

你能帮帮我吗?

非常感谢

EN

回答 1

Stack Overflow用户

发布于 2012-10-11 12:26:50

尝试使用BasicHttpBinding...当我使用WSHttpBinding时,我遇到了一些问题...BasicHttpBinding解决了我的问题!

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12197079

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档