Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7871727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:59:31+00:00 2026-06-03T01:59:31+00:00

I am trying to programmatically create several Message Queues on a Windows 2003×64/2008R2 Server.

  • 0

I am trying to programmatically create several Message Queues on a Windows 2003×64/2008R2 Server.
When a Queue is created, Windows automatically applies default permissions to the Queue.

For MSMQ 4, the following users are added by default

  • Everyone
  • Creator of the queue
  • ANONYMOUS LOGIN

When I set the permissions for a queue using MessageQueue.SetPermissions(), the specified AccessControlList is only appended to the default security permissions.

Is there any way the default permissions can be removed or overwritten?
In this MSDN Article at the bottom, it states that

You can’t, though, customise the defaults as they are hard-coded.

I know that the settings of a queue are persisted in a file, located in C:\Windows\System32\msmq\storage\lqs. In this file there’s a Security property that represents the permissions for the queue. Might editing this key be an option? Doing this, however, seems kind of odd to me.

I’m looking for a proper way to specify my own AccessControlList that overwrites the default security permissions of a queue. Either when it’s being created, or afterwards.

Any help is appreciated,

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:59:33+00:00Added an answer on June 3, 2026 at 1:59 am

    If you can’t remove or revoke permissions to those default groups you can always try to deny rights to them. Deny takes precedence over allow. This code works:

    MessageQueue queue = new MessageQueue(".\\Private$\\QueueName");
    queue.SetPermissions("Everyone", MessageQueueAccessRights.ReceiveMessage,
            AccessControlEntryType.Deny);
    

    Revoking permissions (AccessControlEntryType.Revoke) should also work though. Maybe there is an error in your code. Works on my machine.

    The article says:

    You can’t, though, customise the defaults as they are hard-coded.

    and it means that you can’t change what rights are given during queue creation but you can change them afterwards.

    Edit: To get “Everyone” independent of OS-language: How to get the IdentityReference for "Everyone" to create MutexAccessRule on localized systems?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to programmatically create an Outbound Windows firewall rule. In addition, I'd
I am trying to programmatically create a PowerPoint from graphs in Access. Ideally, when
I am trying to programmatically create a number of PDF documents with a watermark
I am trying to create a .vcf file programmatically in C#, and writing a
I'm trying to create a UIButton programmatically. I have a button called addCash (which
Trying to programmatically add options to a SELECT drop down in IE Windows Mobile.
I have several NSComboBoxes created in Interface Builder, and one created programmatically. The NSComboBoxes
I am trying to create UIViewController programmatically for ModalView presentation on the main window
I'm trying to create a UISearchDisplayController programmatically. I have a method which should set
I'm all new to Android and I'm trying to create a spinner programmatically and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.