我正在尝试移植一些基于WSE3的代码。0到WCF。基本上,旧代码具有以下配置:
<microsoft.web.services3>
<diagnostics>
<trace enabled="true" input="InputTrace.webinfo" output="OutputTrace.webinfo" />
</diagnostics>
<tokenIssuer>
<statefulSecurityContextToken enabled="false" />
</tokenIssuer>
</microsoft.web.services3>
通过“服务引用”调用同一服务时,我会遇到以下错误:
请求不包含所需的安全标头
我的装订看起来像这样:
<basicHttpBinding>
<binding name="LegalUnitGetBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport">
</security>
</binding>
</basicHttpBinding>
据我所知,我调用的服务只需要SSL连接,因为它接收用户名和密码作为请求参数的一部分。
任何帮助或建议都将不胜感激。