質問

マシンはWindows7(64ビット)とする。ルを設置しておりますMSMQ確認ができることを期待しています。微りサンプルコードMSMQ).

私たちは、WCFサービスを利用MsmqIntegrationBindingクラスを取得し、以下の例外:

"エラーが発生した開のキューにキューが存在しないとはできないために十分な権限操作を行ないます。●(-1072824317,0xc00e0003).メッセージを送信することができませんやから受領したキューに挿入します保MSMQ置いよいよスタートしました。でも確実にキューを開くのに必要なアクセスモードに許可が必要になります。"

私はvisual studioには管理者モードを明示的に許可を自由URL ACLを使用:netsh http追加urlacl url=http://+:80/ ユーザー=ドメインのユーザー

以下のコード:

 public static void Main()
    {         
        Uri baseAddress = new Uri(@"msmq.formatname:DIRECT=OS:AJITDELL2\private$\Orders");
        using (ServiceHost serviceHost = new ServiceHost(typeof(OrderProcessorService), baseAddress))

        {

            MsmqIntegrationBinding serviceBinding = new MsmqIntegrationBinding();
            serviceBinding.Security.Transport.MsmqAuthenticationMode = MsmqAuthenticationMode.None;
            serviceBinding.Security.Transport.MsmqProtectionLevel = System.Net.Security.ProtectionLevel.None;
            //serviceBinding.SerializationFormat = MsmqMessageSerializationFormat.Binary;
            serviceHost.AddServiceEndpoint(typeof(IOrderProcessor), serviceBinding, baseAddress);
            serviceHost.Open();

            // The service can now be accessed.
            Console.WriteLine("The service is ready.");
            Console.WriteLine("The service is running in the following account: {0}", WindowsIdentity.GetCurrent().Name);
            Console.WriteLine("Press <ENTER> to terminate service.");
            Console.WriteLine();
            Console.ReadLine();

            // Close the ServiceHostBase to shutdown the service.
            serviceHost.Close();
        }
    }

ありがとうございます。すか?

役に立ちましたか?

解決

いただくには"受注"キュー MSMQ.

Windows Server2008できるように、サーバからマネジャー(右クリックしてコンピュータを選んで管理し、その特徴->のメッセージキューイング>個人ます.右クリックし民間のキューに追加"受注"キューにあります。

また、チェックしたいニコラス-アレンの記事: 診断に共通のキューの誤差.その結果に過誤ができ: "このキューが存在しないことがおありかもしれませんねっ指定されたキュー名が正しく".すべてのその他のエラーの場合がスローされ、異なる例外です。

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