【问题标题】:NServiceBus with WCF on Azure在 Azure 上使用 WCF 的 NServiceBus
【发布时间】:2014-01-17 18:40:45
【问题描述】:

我有以下课程:

namespace GAT.Cloud.Integration.WebServices {
    public class DepartureUpdatedService : WcfService<DepartureUpdated, ErrorResponse> {
    }
}

namespace GAT.ESB.Messages.Integration {
    [Serializable]
    public class DepartureUpdated : ICommand {
        public Departure Departure { get; set; }
        public DepartureSeries DepartureSeries { get; set; }
    }
}

namespace GAT.Cloud.Integration.Responses {
    public enum ErrorResponse {
        None,
        Fail
    }
}

以及app.config中的如下sn-p

<system.serviceModel>
    <services>
        <service name="GAT.Cloud.Integration.WebServices.DepartureUpdatedService" behaviorConfiguration="Default">
            <endpoint address="http://<something>.cloudapp.net/WebHttpService/" binding="basicHttpBinding" contract="NServiceBus.IWcfService`2[[GAT.ESB.Messages.Integration.DepartureUpdated, GAT.ESB.Messages.Integration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[GAT.Cloud.Integration.Responses.ErrorResponse, GAT.Cloud.Integration.Responses, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />                  
      </service>
  </services>

我收到两个错误:

The 'contract' attribute is invalid - The value 'NServiceBus.IWcfService`2[[GAT.ESB.Messages.Integration.DepartureUpdated, GAT.ESB.Messages.Integration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[GAT.Cloud.Integration.Responses.ErrorResponse, GAT.Cloud.Integration.Responses, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' is invalid according to its datatype 'serviceContractType' - The Enumeration constraint failed.

The 'name' attribute is invalid - The value 'GAT.Cloud.Integration.WebServices.DepartureUpdatedService' is invalid according to its datatype 'serviceNameType' - The Enumeration constraint failed.

我不知道这有什么问题。有人有什么想法吗?此外,当它作为云服务发布到 Azure 时,它​​是否显示在 http://&lt;something&gt;.cloudapp.net/WebHttpService/ 的正确设置?

【问题讨论】:

    标签: c# wcf azure nservicebus azure-worker-roles


    【解决方案1】:

    解决方案是端点。应该是:

    <endpoint address="" binding="basicHttpBinding" contract="NServiceBus.IWcfService`2[[GAT.ESB.Messages.Integration.DepartureUpdated, GAT.ESB.Messages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[GAT.Cloud.Integration.Responses.ErrorResponse, GAT.Cloud.PhoenixIntegration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" />
    

    【讨论】:

    • 我在哭,但我不知道为什么。
    • NServiceBus.IWcfService`2[[GAT.ESB.Messages.Integration.DepartureUpdated, GAT.ESB.Messages.Integration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null ],[GAT.Cloud.Integration.Responses.ErrorResponse, GAT.Cloud.Integration.Responses, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] 这使它有点……嗯,反清洁
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-13
    • 2013-04-19
    • 1970-01-01
    • 1970-01-01
    • 2016-12-31
    • 1970-01-01
    相关资源
    最近更新 更多