小编use*_*540的帖子

未提供用户名.在ClientCredentials中指定用户名

我创建一个带有客户端凭据的WCF应用程序.它在内部正常工作,而我从其他项目调用和调用此服务意味着我收到了错误消息.

The username is not provided. Specify username in ClientCredentials.
Run Code Online (Sandbox Code Playgroud)

请帮我解决这个问题.

<bindings>
  <wsHttpBinding>
 <binding name="WSHttpBinding_IWcfService" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                bypassProxyOnLocal="false" transactionFlow="false" 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="TransportWithMessageCredential">
                    <transport clientCredentialType="None" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="UserName" negotiateServiceCredential="true"
                        algorithmSuite="Default" />
                </security>
            </binding>
  </wsHttpBinding>
</bindings>
<client>
 <endpoint address="https://wcfauthtest.sbs.in:448/WcfService.svc/WcfService.svc"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IWcfService"
                contract="AuthTest.IWcfService" name="WSHttpBinding_IWcfService">
                <identity>
                    <dns value="localhost" />
                </identity>
 </endpoint>
</client>
Run Code Online (Sandbox Code Playgroud)

有帮助吗?

c# asp.net wcf web-services c#-4.0

7
推荐指数
1
解决办法
1万
查看次数

使用字段从 json 字符串获取值

我有一个 json 字符串。我想使用字段名称从该字符串中获取值。请帮我得到这个。这是我的 json 字符串格式。

[
    {
        "FLD_ID": 1,
        "FLD_DATE": "17-02-2014 04:57:19 PM"
        "FLD_USER_NAME": "DAFEDA",
        "FLD_USER_EMAIL": "test@gmail.com",
        "FLD_USER_PASS": "test"
    }
]
Run Code Online (Sandbox Code Playgroud)

javascript jquery json

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

asp.net ×1

c# ×1

c#-4.0 ×1

javascript ×1

jquery ×1

json ×1

wcf ×1

web-services ×1