【发布时间】:2014-10-21 08:59:30
【问题描述】:
我有一个需要测试的项目,它是一项围绕合同构建的服务(我认为是 wcf??)。当我尝试启动它时,我收到以下错误消息:
Error starting service: The contract name 'VMBRLight.VMBRService' could not be found in the list of contracts implemented by the service 'VMBRLight.VMBRService'.
我在哪里可以找到已执行的合同清单??
这是我认为相关的代码,服务的实现:
namespace VMBRLight
{
[ServiceBehavior(Namespace = "", Name = "VMBRLight.VMBRService", InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Multiple, ReleaseServiceInstanceOnTransactionComplete = false, IncludeExceptionDetailInFaults = false,
MaxItemsInObjectGraph = 2147483647, TransactionIsolationLevel = IsolationLevel.RepeatableRead)]
public class VMBRLightService : VMBRService
{
配置
<service behaviorConfiguration="VMBRLightServiceBehavior" name="VMBRLight.VMBRLightService">
<host>
<baseAddresses>
<add baseAddress="http://localhost:5250/VMBRLightService" />
</baseAddresses>
</host>
<endpoint address="" binding="basicHttpBinding" contract="VMBRLight.VMBRService" bindingConfiguration="WebBinding" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
【问题讨论】:
-
你能展示一下
VMBRLight.VMBRService的样子吗? -
我已经编辑了你的标题。请参阅“Should questions include “tags” in their titles?”,其中的共识是“不,他们不应该”。