MSDN > 論壇首頁 > Visual Studio Smart Device Development – Visual Basic and C# Projects > MSMQ : The Queue Does not Exist or you do not have sufficient permissions to perform the Operation
發問發問
 

已答覆MSMQ : The Queue Does not Exist or you do not have sufficient permissions to perform the Operation

  • 2007年12月20日 上午 07:01Biju S Melayil 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    Dear All,

     

    I am working on a mobile application where iam sending data from the Windows Mobile Device to the Server using MSMQ. 

     

    earlier i was using a Static IP server and sending the Queue using the following Code:

    MessageQueue DepositQueue = new MessageQueue(String.Format(System.Globalization.CultureInfo.InvariantCulture,

     @"FORMATNAMEBig SmileIRECT=TCP:{0}\private$\DepositQueue", "xxx.xxx.xxx.xxx"));

     

    The Data was getting transferred without any issues.

     

    Now i have shifted my server to a hosting server and changed the Queue as following:

    MessageQueue DepositQueue = new MessageQueue();

    string path = @"FormatNameBig SmileIRECT=HTTP://www.myserver.com\MSMQ\DepositQueue";

    DepositQueue.Path = path;

     

    But now am getting a error as "The Queue Does not Exist or you do not have sufficient permissions to perform the Operation".

     

    I have provided the Permission to the Queue in the server adding the IWAM and IUSER Accounts to the user group of the Queue. I also changed the path as "Direct=http://www.myserver.com\MSMQ\DepositQueue".  but the error remains there.

     

    I would like to know whether any other additional provision has to be provided out here.. pl. let me know

     

    Enviornment:

    Mobile : WIndows Mobile 5

    Server : Windows 2003 Enterprise Server(64 bit) , IIS 6.0

     

    Thanks in advance

    Regards

    Biju S Melayil

解答

  • 2007年12月21日 下午 11:28Ilya TumanovMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆

    How about this:

     

    @"FormatNameBig SmileIRECT=HTTP://www.myServer.com/MSMQ/private$/DepositQueue"

     

    You can check registry (see same link for MSMQ registry description) to see if SRMP is enabled or not.

     

    Also see this.

所有回覆

  • 2007年12月20日 上午 07:53Ilya TumanovMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    Your format name appears to be wrong. Correct one must use same ending as before including "private$", see this. Also make sure you have SRMP support configured on device or it would refuse all messages in SRMP format.

  • 2007年12月20日 上午 09:57Biju S Melayil 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

     

    Dear IIlya,

     

    Thanks for the Response.

     

    I changed the Code as per your Specifications and now it looks like this:

    MessageQueue DepositQueue = new MessageQueue();

    string path = @"DIRECT=HTTP://www.myServer.com/MSMQ/private$/DepositQueue";

    DepositQueue.Path = path;

     

    But now am getting Error as : PATH SYNTAX IS INVALID.

     

    Where and how should i Check SRMP support configured on device.

    Pl. let me know


    Thanks.

    Regards

    Biju S Melayil

  • 2007年12月21日 下午 11:28Ilya TumanovMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆

    How about this:

     

    @"FormatNameBig SmileIRECT=HTTP://www.myServer.com/MSMQ/private$/DepositQueue"

     

    You can check registry (see same link for MSMQ registry description) to see if SRMP is enabled or not.

     

    Also see this.

  • 2007年12月26日 上午 11:09Biju S Melayil 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

     

    Hi Ilaya,

     

    Thanks for the response.

    The Code has been changed as follows:

    MessageQueue DepositQueue = new MessageQueue();

    string path = @"FormatNameBig SmileIRECT=HTTP://www.myserver.com/MSMQ/private$/DepositQueue";

    DepositQueue.Path = path;

     

    Plus, i Have changed the Registry key settings as follows:

    string keyName = @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\SimpleClient";

    Registry.SetValue(keyName, "SrmpEnabled","Yes");

    Registry.SetValue(keyName, "BinaryEnabled", "No");

     

    Now am not getting error on the device side, but the Message is not seen in my MSMQ Private Queue. When i send a Message from the device to the server am getting a new Outgoing Queue created in the MSMQ Service with the same Queue Name (HTTP://www.myserver.com/MSMQ/private$/DepositQueue")

     

    Is there anything which i have Missed???

    I haven't opened the application which receives this message and saves it to the datbase.

     

    So Pl. let me know if i did something wrong out here.

     

    Merry Xmas

    Cheers

    Biju S Melayil

  • 2007年12月26日 下午 08:45Ilya TumanovMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    That means message cannot be delivered, probably due to networking issues (server is not accessible, needs authorization, improperly configured proxy/firewall and so on). I would suggest typing server URL in pocket IE on device. If it can’t be reached then you have networking issues to fix.

     

  • 2007年12月28日 下午 03:17Biju S Melayil 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

     

    Hi Ilaya,

     

    I tried the URL from the device and its able to browse the site from the Pocket PC.

    I have a small doubt which i would like to clarify with you.

     

    Whenever i send a Message through this queue i don't find any Message in that Deposit Queue in the server. But in the outgoing queue i find a new queue being created which look like this.

    DIRECT=HTTP://myserver.com/MSMQ/private$/DepositQueue

     

    Does this means my message is getting delivered in to the Message Queue?

    I havent opened my deskop application which receives this message saves to the databse, which means this message should be displayed in the private queue.

    Can u clarify this point?

     

    I checked the Security and the Firewall of the Server and in that it should the Windows Services which are allowed and Running including MSMQ Services.

     

     

    Thanks

    Regards

    Biju S Melayil

     

     

     

     

  • 2007年12月28日 下午 07:50Ilya TumanovMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    MSMQ works similar to how USPS works.

     

    You write your letter, write in address (queue format name), attach stamp and put it into your mail box with raised red flag (send the message using MSMQ).

    Your mail (message) then sits in this mail box near your house (outgoing queue). Note at that point you can get address wrong on your letter (bad format name), however that won’t stop you from putting letter into mail box (sending it).

    OK, so later one mail man comes (network connection is established). Mail man picks your mail (MSMQ connects to the destination server) and if everything is OK it goes through the system (network) and ends up in receiving mail box (destination queue). Recipient (your application on the server) don’t have to be near (don’t have to be running) this mail box (queue) for mail to arrive.

    At some point somebody (your application) opens mail box (application on the server reads from the destination queue) and gets mail.

    What could go wrong here? Well, you can get address wrong. Mail man can never come (no network connection on device). Destination might be inaccessible, say avalanche blocked the roads (server is down or no network path to it) or there’s civil disturbance and it’s blocked out by the police (firewall or security configuration prevents connection to the server).

    Another thing: I’m not absolutely sure, but you might have to install web server and configure MSMQ ISAPI DLL for SRMP to work.