私はwcfを初めて使用し、wshttpbindingを使用していますが、サービスクライアントからユーザー名とパスワードを削除したい(これを渡す必要があります)、私のクライアントコードは
RServiceClient serviceClient = new RServiceClient();
serviceClient.ClientCredentials.Windows.ClientCredential.UserName = "UserName";
serviceClient.ClientCredentials.Windows.ClientCredential.Password = "Password";
このユーザー名とパスワードを渡したくありません。
私のクライアント app.config は次のとおりです。
<binding name="WSHttpBinding_IRService"
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="Message">
<transport clientCredentialType="Windows"
proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows"
negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
rit now サービスは Web でホストされています。service.config またはクライアント側 app.config に変更はありますか。ググった後の私の弱い知識では、変更はクライアント側でなければならないということですが、私はそれを行うことができません。:-(
注:私の契約にはセッションも必要です。事前に感謝します。