0

我想在带有 apache 2.2.13 和 mono 2.10.2 的 opensuse 11.2 上托管 WCF 服务,但我没有找到任何可以详细解释我的东西,而且我所有的尝试都是错误的。有人可以帮助我吗?在此先感谢 F。

4

1 回答 1

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 的机制不起作用。但是正常调用该服务是有效的。如果我从我的浏览器调用服务,这是错误:

<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>
于 2011-08-01T08:32:46.470 回答