我試圖在CentOS上使用單聲道2.10.8託管WCF服務,並將其作爲REST或SOAP服務器進行訪問。使用mod_mono的WCF服務
<configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="WebBehavior" name="Services.Hello">
<clear/>
<endpoint address="http://DOMAIN/service" behaviorConfiguration="HelloBehavior" binding="webHttpBinding" contract="Services.IHello" />
<endpoint address="http://DOMAIN/web" binding="basicHttpBinding" bindingConfiguration="" contract="Services.IHello" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="HelloBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="WebBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
如果我現在請DOMAIN/web?wsdl
或DOMAIN/service/hello
(/hello
是一種方法的一個WebGetAttribute的UriTemplate:
我使用含有我的web.config MOD-單服務器4中的文件夾中啓動的應用程序在IHello)我只得到了404:
Server Error in '/' Application
The resource cannot be found.
我也有一個Service.svc
文件containting:
如果我打電話DOMAIN/Service.svc/hello
我得到一個SOAP錯誤:
The request message has the target 'http://DOMAIN/Service.svc/hello' with action '' which is not reachable in this service contract
如果我在服務器上啓動控制檯應用程序執行以下操作:
WebServiceHost sh = new WebServiceHost(typeof(Hello), new Uri("http://localhost:681/service"));
sh.Open();
我可以在端口680來訪問服務所以mono應該可以運行該服務,但我需要它使用mod_mono(在端口80上)運行。
我需要什麼配置不同?
最後,我試圖託管一個SyndicationFeed來提供RSS/Atom-Feeds。