我正在尝试使用TCP作为数据共享协议来创建WCF服务。但是在我向服务合同添加自定义对象后遇到了问题。在我添加之前,一切正常。
[OperationContract]
List<TaskScheduler> GetAllTaskSchedulers();
有谁知道为什么会这样?这是我的WCF服务的.config
<bindings>
<netTcpBinding>
<binding name="PortBinding" portSharingEnabled="true" />
</netTcpBinding>
</bindings>
<services>
<service name="NxtTaskService.ServiceContracts.TaskService" behaviorConfiguration="NxtTaskServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8000/nxtask" />
</baseAddresses>
</host>
<endpoint address="service" binding="netTcpBinding" contract="NxtTaskService.ServiceContracts.ITaskService" name="tcp" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="NxtTaskServiceBehavior">
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
我正在使用Visual Studio 2017和64位版本的IIS Express