WCF会话配置错误
我想在我的服务中启用(SessionMode=SessionMode.Required),因此启用后,使用WCF Client test测试该服务时,会出现以下错误: 无法处理该消息。这很可能是因为操作“”不正确,或者是因为消息包含无效或过期的安全上下文令牌,或者是因为绑定之间不匹配。如果服务因不活动而中止通道,则安全上下文令牌将无效。为了防止服务过早中止空闲会话,请增加服务端点的binding.HTTP GET Error上的接收超时WCF会话配置错误,wcf,wcf-data-services,wcf-binding,wcf-security,Wcf,Wcf Data Services,Wcf Binding,Wcf Security,我想在我的服务中启用(SessionMode=SessionMode.Required),因此启用后,使用WCF Client test测试该服务时,会出现以下错误: 无法处理该消息。这很可能是因为操作“”不正确,或者是因为消息包含无效或过期的安全上下文令牌,或者是因为绑定之间不匹配。如果服务因不活动而中止通道,则安全上下文令牌将无效。为了防止服务过早中止空闲会话,请增加服务端点的binding.HTTP GET Error上的接收超时 URI: http://localhost:7645/Pu
URI: http://localhost:7645/PublisherService.svc
HTML文档不包含Web服务发现信息
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="myBasicBinding" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" closeTimeout="00:01:00" openTimeout="00:01:00" sendTimeout="00:01:00" receiveTimeout="00:01:00">
<readerQuotas maxDepth="128" maxStringContentLength="8388608" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647"/>
</binding>
</basicHttpBinding>
<!--enable WSHTTPBinding session-->
<wsHttpBinding>
<binding name="bindingAction" transactionFlow="false" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" sendTimeout="00:01:00" receiveTimeout="00:01:00" closeTimeout="00:01:00" openTimeout="00:01:00">
<readerQuotas maxDepth="128" maxStringContentLength="8388608" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647"/>
<reliableSession enabled="true"/>
<security mode="Transport">
<message establishSecurityContext="false" clientCredentialType="IssuedToken"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<protocolMapping>
<add scheme="http" binding="wsHttpBinding"/>
</protocolMapping>
<!-- \\\\\\\\\\\\\\\\\\\\\\\\\\\ -->
<services>
<service name="AllChatService.PublisherService" behaviorConfiguration="metadataSupport">
<host>
<baseAddresses>
<add baseAddress ="http://localhost:7645/"/>
</baseAddresses>
</host>
<endpoint contract="AllChatService.PublisherService" binding="wsHttpBinding" address=""/>
<!--Enable Meta Data Publishing-->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="metadataSupport">
<serviceDebug includeExceptionDetailInFaults="False" />
<!--Enable WSDL Data Binding-->
<serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
[ServiceBehaviorAttribute(InstanceContextMode = InstanceContextMode.PerCall)]
public class PublisherService : IPublisher
{
}
[ServiceContract(SessionMode = SessionMode.Required)]
public interface IPublisher
{
}
[ServiceBehaviorAttribute(InstanceContextMode=InstanceContextMode.PerCall)]
公共类PublisherService:IPPublisher
{
}
[ServiceContract(SessionMode=SessionMode.Required)]
公共接口IPPublisher
{
}
有谁能帮我解决这个问题。拆下线路
<security mode="Transport">
从web.config文件。因为传输似乎需要HTTPS来加密凭据。但我不需要加密凭据,只想运行服务。在web.config中添加此行