我從我的WCF客戶端收到以下錯誤。 「未指定安全令牌頒發者的地址,必須在目標'http://site.com/TLAPI.svc'的綁定中指定明確的頒發者地址,或者必須在證書中配置本地頒發者地址。」WCF客戶端錯誤:「未指定安全令牌頒發者的地址」
我正在嘗試連接到SharePoint服務應用程序。我添加了下面生成客戶端類的服務引用。這裏是我的代碼至今:
TipAndLeadAPIContractClient client = new TipAndLeadAPIContractClient(@"CustomBinding_ITipAndLeadAPIContract", @"http://site.com/TLAPI.svc");
client.ChannelFactory.Credentials.SupportInteractive = false;
client.ClientCredentials.UserName.UserName = "user";
client.ClientCredentials.UserName.Password = "password";
client.ConvertToTLForm(@"C:\Clients\ServiceApplication\CAP\capsample1.xml", "tl_library", "http://site/");
這裏是我的客戶端綁定配置:
<binding name="CustomBinding_ITipAndLeadAPIContract">
<security defaultAlgorithmSuite="Default" authenticationMode="IssuedToken"
requireDerivedKeys="true" securityHeaderLayout="Strict" includeTimestamp="true"
keyEntropyMode="CombinedEntropy" messageProtectionOrder="SignBeforeEncryptAndEncryptSignature"
messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
requireSignatureConfirmation="false">
<issuedTokenParameters keyType="SymmetricKey" tokenType="" />
<localClientSettings cacheCookies="true" detectReplays="true"
replayCacheSize="900000" maxClockSkew="00:05:00" maxCookieCachingTime="Infinite"
replayWindow="00:05:00" sessionKeyRenewalInterval="10:00:00"
sessionKeyRolloverInterval="00:05:00" reconnectTransportOnFailure="true"
timestampValidityDuration="00:05:00" cookieRenewalThresholdPercentage="60" />
<localServiceSettings detectReplays="true" issuedCookieLifetime="10:00:00"
maxStatefulNegotiations="128" replayCacheSize="900000" maxClockSkew="00:05:00"
negotiationTimeout="00:01:00" replayWindow="00:05:00" inactivityTimeout="00:02:00"
sessionKeyRenewalInterval="15:00:00" sessionKeyRolloverInterval="00:05:00"
reconnectTransportOnFailure="true" maxPendingSessions="128"
maxCachedCookies="1000" timestampValidityDuration="00:05:00" />
<secureConversationBootstrap />
</security>
<binaryMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
maxSessionSize="2048">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binaryMessageEncoding>
<httpTransport manualAddressing="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" />
</binding>
這裏是我的服務應用綁定配置:
<binding name="CalcServiceHttpBinding">
<security authenticationMode="IssuedToken" allowInsecureTransport="true" />
<binaryMessageEncoding>
<readerQuotas maxStringContentLength="1048576" maxArrayLength="2097152" />
</binaryMessageEncoding>
<httpTransport maxReceivedMessageSize="2162688" authenticationScheme="Ntlm" useDefaultWebProxy="false" />
</binding>
在此先感謝。
您是否有任何關於如何創建安全令牌服務器的好網站或文獻? –
這裏有一篇很好的文章[1],詳細介紹瞭如何使用「日內瓦」框架構建自定義STS。沒有「日內瓦」的話,肯定會比以前更容易,所以我建議走這條路。 [1] http://msdn.microsoft.com/en-us/magazine/dd347547.aspx –
沒有更新的版本?它是從2008年開始的,許多組件都過時了。當我參考較新的程序集時,我已經修改了很多代碼,並且發現了很多構建錯誤。 –