Vb.net WCF相关-System.ServiceModel.FaultException:无法处理该消息
这类似于: 然而,我并没有像那个人那样忘记一个条目,但我仍然得到同样的错误 我得到: System.ServiceModel.FaultException:无法处理该消息。这很可能是因为操作“”不正确,或者是因为消息包含无效或过期的安全上下文令牌,或者是因为绑定之间不匹配。如果服务因不活动而中止通道,则安全上下文令牌将无效。为了防止服务过早中止空闲会话,请增加服务端点绑定上的接收超时 注意:我从服务器上的控制台应用程序托管服务,然后从另一台服务器上的web应用程序调用该服务 我的客户机web.config文件如下所示:(注意:“IP地址”和“userPrincipalName”都是本文虚构的。)Vb.net WCF相关-System.ServiceModel.FaultException:无法处理该消息,vb.net,wcf,Vb.net,Wcf,这类似于: 然而,我并没有像那个人那样忘记一个条目,但我仍然得到同样的错误 我得到: System.ServiceModel.FaultException:无法处理该消息。这很可能是因为操作“”不正确,或者是因为消息包含无效或过期的安全上下文令牌,或者是因为绑定之间不匹配。如果服务因不活动而中止通道,则安全上下文令牌将无效。为了防止服务过早中止空闲会话,请增加服务端点绑定上的接收超时 注意:我从服务器上的控制台应用程序托管服务,然后从另一台服务器上的web应用程序调用该服务 我的客户机web.c
我的服务app.config看起来像:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<services>
<service name="BackupServerServiceLibrary.BackupServerService">
<host>
<baseAddresses>
<add baseAddress = "/BackupServerServiceLibrary/BackupServerService/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding"
contract="BackupServerServiceLibrary.IBackupServerService"
bindingConfiguration="NoSecurity">
<!-- Upon deployment, the following identity element should be removed or replaced
to reflect the identity under which the deployed service runs. If removed,
WCF will infer an appropriate identity automatically. -->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="NoSecurity">
<security mode="None" />
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
有什么想法吗?不确定这是否会导致问题,但是
节点在配置文件中具有不同的类型和值。DNS在服务端,UPN在客户端。我之前做了相同的设置,但没有改变任何东西。
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<services>
<service name="BackupServerServiceLibrary.BackupServerService">
<host>
<baseAddresses>
<add baseAddress = "/BackupServerServiceLibrary/BackupServerService/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding"
contract="BackupServerServiceLibrary.IBackupServerService"
bindingConfiguration="NoSecurity">
<!-- Upon deployment, the following identity element should be removed or replaced
to reflect the identity under which the deployed service runs. If removed,
WCF will infer an appropriate identity automatically. -->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="NoSecurity">
<security mode="None" />
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>