Click here to Skip to main content
15,885,216 members
Articles / Programming Languages / C#
Tip/Trick

MSMQ: Deleting a Private Queue Where Access is Now Denied

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
22 Jun 2016CPOL 16.8K   1   1
How to remove a private queue where the access is corrupted

Introduction

You know the story, you are working on a private MSMQ. Something goes wrong and now you cannot access the queue to clear it down or remove it.

My Tip

Navigate to C:\Windows\System32\msmq\storage\lqs, open each file until:

  1. you find the one with the offending queue name, and
  2. any other that is behaving itself

Move the offending file to another folder - you may not have edit access in the lqs folder. This has the effect of removing the queue from computer management, and that may be job done for you.

If you want to work with the queue, copy the security string from your working queue and use it to replace the security string in the damaged one. Now return the queue definition to the lqs folder.

This gave me back access to the queue.

History

  • 2016-06-22 - Initial version

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Ireland Ireland
My first program was written in Basic on a Sinclair Spectrum ZX 16K in the summer of '85. Having studied Computer Systems I attempted to break into the world of C but took a wrong turn and got immersed in COBOL!

I looked a C again in 1994 but didnt follow up on it. In 2001 I introduced myself to Visual C++ 6.0 courtesy of Ivor Hortons book, but found the going difficult. I tipped my toe in the .NET water in '05 but the first example I tried in VC++ 2005 express didnt work and allied with the absence of MFC in the express package, I parked that up.

Along the way my career got shunted into software testing

A personal machine change force me to migrate to VS2008 in 2008. The new edition of Ivor Hortons book for VC++ in VS2008 reintroduced me to .NET and I got curious whereupon I went out and acquired Stephen Fraser's "Pro Visual C++/CLI and
the .NET 3.5 Platform". I was hooked!

After 20 years I think I finally found my destination.

But it would take a further 8 years of exile before I was reappointed to a developer role. In that time I migrated to C# and used selenium wedriver (courtesy of Arun Motoori's Selenium By Arun) as the catalyst to finally grab the opportunity.

Comments and Discussions

 
Answerdoes the job Pin
Member 1597743813-Mar-24 1:35
Member 1597743813-Mar-24 1:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.