質問

私はトランザクションシステム不能キューからデッドレターを読んでサービスを作成しようとしています。

このようなサービスの設定になります。

<service name="NotificationDeadLetterQueueService">
 <endpoint
  address="net.msmq://localhost/system$;DeadXact"
  binding="netMsmqBinding"
  contract="INotificationService"
/>
</service>

私のサービスインタフェースます:

[ServiceContract]
public interface INotificationService
{
[OperationContract(IsOneWay=true)]
[NetDataContractSerializerFormatAttribute]
void HandleNotification(Notification notification);
}

私のサービスの実装でます:

[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
public class NotificationDeadLetterQueueService : INotificationService
{
   #region INotificationService Members

   [OperationBehavior(TransactionScopeRequired = true)]
   public void HandleNotification(Notification notification)
   {
      throw new NotImplementedException();
   }

   #endregion
}

とスタート、このようなホストます:

ServiceHost serviceHost = new ServiceHost(typeof(NotificationDeadLetterQueueService));
serviceHost.Open();

のようなこれまでのところ、すべてのルックスは多くの書籍やチュートリアルで説明したが、私はトランザクション配信不能キュー内のデッドレターを生成する際にサービスが起動されません。私のサービスで間違ったとは何ですか?

の助けをありがとう Enyra

役に立ちましたか?

解決

私はかなりトリックで問題を見つけました。デッドレターキューサービスもなしにセキュリティモードを定義するバインディングを必要とするように、MSMQクライアントエンドポイントは、との結合構成を使用します。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top