使用mono 2.10.2在mod_mono上安装WCF

时间:2011-07-29 14:26:54

标签: wcf apache mono opensuse

我希望在openuse 11.2上使用apache 2.2.13和mono 2.10.2托管WCF服务,但是我没有找到任何可以解释我详细程度的内容,而且我所有的尝试都是错误的。有人可以帮帮我吗? 提前致谢 F。

1 个答案:

答案 0 :(得分:0)

我已经部分解决了我的问题,使用visual studio创建服务并在另一个项目中生成代理。然后使用此web.config配置在linux机器上发布服务:

    <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="NewBinding0" />
      </basicHttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="WcfService2.Service1Behavior"
        name="WcfService2.Service1">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="NewBinding0"
          contract="WcfService2.IService1" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="WcfService2.Service1Behavior">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="false"  />
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

并将这两行添加到mod_mono.conf

MonoServerPath "/usr/bin/mod-mono-server4"
ddType application/x-asp-net .svc

问题我的意思是只在单声道上wsdl的机制不起作用。但通常要求服务工作。 如果我从我的prowser呼叫服务,这是错误:

<Fault><Code><Value>a:InternalServiceFault</Value></Code><Reason><Text xml:lang="">The server was unable to process the request due to an internal error.  The server may be able to return exception details (it depends on the server settings).</Text></Reason></Fault>
相关问题