<services>
<service name="Lobby server.User Service" behavior Configuration="Service Behavior User">
<host>
<base Addresses>
<add baseAddress="net.tcp://localhost:5061" />
</base Addresses>
</host>
<!-- Service Endpoints -->
<endpoint address="user" binding="netTcpBinding" binding Configuration="User Binding" contract="Lobby server.IUserService" />
<endpoint address="user/Mex" binding="mexTcpBinding" name="ServiceBehaviorUser" contract="IMetadataExchange" />
</service>
<service name="Lobby server.Public Service" behavior Configuration="ServiceBehaviorPublic">
<host>
<base Addresses>
<add baseAddress="net.tcp://localhost:5049" />
</base Addresses>
</host>
<!-- Service Endpoints -->
<endpoint address="public" binding="netTcpBinding" binding Configuration="Public Binding" contract="Lobby server.IPublicService" />
<endpoint address="public/Mex" binding="mexTcpBinding" name="ServiceBehaviorPublic" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<service Behaviors>
<behavior name="ServiceBehaviorUser">
<service Debug includeExceptionDetailInFaults="true" />
<service Metadata />
<service Credentials useIdentityConfiguration="true">
<service Certificate find Value="pident.cloudapp.net" store Location="CurrentUser" storeName="My" x509FindType="FindBySubjectName" />
</service Credentials>
<service Authorization principalPermissionMode="Always" />
</behavior>
<behavior name="ServiceBehaviorPublic">
<service Debug includeExceptionDetailInFaults="true" />
<service Metadata />
<service Credentials>
<service Certificate find Value="pident.cloudapp.net" store Location="CurrentUser" storeName="My" x509FindType="FindBySubjectName" />
</service Credentials>
</behavior>
</service Behaviors>
</behaviors>
我检查了合同和名称,但随后也发生错误并且地址为空。
错误:
在服务模型客户端配置部分中找不到名称为 NetTcpBinding_IUserService 和合同 Lobby server.IUserService 的端点元素。这可能是因为没有为您的应用程序找到配置文件,或者因为在客户端元素中找不到与此名称匹配的端点元素。
知道出了什么问题吗?任何帮助将不胜感激。谢谢