установка WCF на mod_mono с моно 2.10.2 - PullRequest
0 голосов
/ 29 июля 2011

Я хочу разместить службу WCF в opensuse 11.2 с apache 2.2.13 и mono 2.10.2, но я не нашел ничего, что объясняло бы мне, как в деталях, и все мои предположения неверны. Кто-то может мне помочь? заранее спасибо F.

1 Ответ

0 голосов
/ 01 августа 2011

Я частично решил мою проблему, используя Visual Studio для создания сервиса и генерации прокси в другом проекте.Затем публикуем на машине linux сервис с такой конфигурацией web.config:

    <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>
...