【问题标题】:installing WCF on mod_mono with mono 2.10.2使用 mono 2.10.2 在 mod_mono 上安装 WCF
【发布时间】:2011-07-29 14:26:54
【问题描述】:

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

【问题讨论】:

    标签: wcf apache mono opensuse


    【解决方案1】:

    我已经部分解决了我的问题,使用 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>
    

    【讨论】:

      猜你喜欢
      • 2012-11-10
      • 1970-01-01
      • 2020-05-29
      • 2011-03-31
      • 1970-01-01
      • 2012-02-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多