【发布时间】:2014-05-22 13:04:31
【问题描述】:
我正在尝试在具有 mono 3.2.8 的 ubuntu 服务器上运行 Nancy,当我启动服务器时它给了我以下错误:
:~/temp$ sudo mono Medusa.WEB.Server.exe
System.InvalidOperationException: ContractDescription 'NancyWcfGenericService' has zero operations; a contract must have at least one operation.
at System.ServiceModel.Description.ServiceEndpoint.Validate () [0x00000] in <filename unknown>:0
at System.ServiceModel.ServiceHostBase.ValidateDescription () [0x00000] in <filename unknown>:0
at System.ServiceModel.ServiceHostBase.InitializeRuntime () [0x00000] in <filename unknown>:0
at System.ServiceModel.ServiceHostBase.OnOpen (TimeSpan timeout) [0x00000] in <filename unknown>:0
at System.ServiceModel.Channels.CommunicationObject.Open (TimeSpan timeout) [0x00000] in <filename unknown>:0
at System.ServiceModel.Channels.CommunicationObject.Open () [0x00000] in <filename unknown>:0
at Medusa.WEB.Server.WcfWebServer.Start () [0x00000] in <filename unknown>:0
当我尝试使用 mono 2.10 时没有发生此错误,而是在我调用其余 web 服务时遇到了不同的错误(这就是我更新到 3.2.8 的原因)。此外,服务器可以在 Windows 上运行。
【问题讨论】: