更新时间:2023-12-01 07:49:57
确保使用添加引用=>创建了老式的引用.使用Visual Studio在添加参考屏幕中的高级选项.
使用提琴手检查wcf客户端是否实际上在标头中发送WWW身份验证信息.
Make sure that you have created an old fashioned reference using the add reference => advanced option in the add reference screen using visual studio.
Use fiddler to check if the wcf client is actually sending the WWW-authenticate information in the header.
这是我的wcf客户端配置:
here is my wcf client configuration:
<br />
<pre lang="xml"><system.serviceModel><br />
<bindings><br />
<basicHttpBinding><br />
<binding name="EchoSoap" closeTimeout="00:01:00" openTimeout="00:01:00"<br />
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"<br />
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"<br />
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"<br />
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"<br />
useDefaultWebProxy="true"><br />
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"<br />
maxBytesPerRead="4096" maxNameTableCharCount="16384" /><br />
<security mode="TransportCredentialOnly"><br />
<message clientCredentialType="UserName" algorithmSuite="Default" /><br />
</security><br />
</binding><br />
</basicHttpBinding><br />
</bindings><br />
<client><br />
<endpoint address="http://localhost/Web%20Security/Echo.asmx"<br />
binding="basicHttpBinding" bindingConfiguration="EchoSoap"<br />
contract="Echo.EchoSoap" name="EchoSoap" /><br />
</client><br />
</system.serviceModel></pre><br />
<br />