我试图在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。