.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

MSMQ: what is the real limit of private queue name length (.NET 2.0)?

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :.NET Framework

I ran across am unexpected behavior of MSMQ (XP/2003, .NET 2.0), when queue name longer that some limit does not work.

I fount this: http://msdn.microsoft.com/en-us/library/ms706083(v=VS.85).aspx, which states that maximum is 124.

My working queues are ~70 characters long; working with no issues.

If queue name length is 108 characters I get the following:

1. Attempt to open queue results in The queue does not exist or you do not have sufficient permissions to perform the operation.

2. Attempt to create queue results in Format name buffer supplied to the API was too small to fit the format name.

3. In both cases above exception is thrown by the same method: System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath

4. Queue is in fact created with full non-truncated name.


So what's the name limit for private queue name?

Does this limit include machine name?  My queue names (which I count characters in) look like .\Private$\ABCDEF...



View Complete Post

More Related Resource Links

Is there a limit to the length of a vb script job

This sounds stupid, but I created a ms sql server job that is activeX - language = vbscript The job is just a series of log statements. If I make the script > 300 lines long, I get errors. If I chop out some of the log statements, it works ok. Does anyone have any idea what is going on and how to get around / fix this? thanks jonathan

MSMQ - Queue Validation

Hi Folks, does anyone know a way of checking that the creation of a private message queue (or attaching to an already existsing message queue) has actually worked? In my program, I create an instance of the MessageQueue class tied to an existing queue by calling the MessageQueue constructor with a 'Format Name' string I've constructed. The string includes the queue name which I extract from a config file. This all works well as long as the queue name is correct. If, however, the referenced queue does not exist then I was expecting the constructor to throw an exception. Unfortunately, it doesn't do this. So, I've tried accessing some of the members of the MessageQueue class after the constructor has executed. In some circumstances accessing MessageQueue.FormatName caused an exception but in other circumstances it didn't. Is there any definitive, fool-proof way of determining an instance of a MessageQueue class is connected to a valid queue? Many thanks, RobDev

Limit to CAML Query Length ?

I have a dynamic CAML Query which runs Nested <Or> Statements. The Query works fine when there are Less than around 300 <Or>s but anything greater produces the "Value does not fall within the expected range" error. 

Newbie Can a HTTP client recieve MSMQ messages from a queue?


Can a HTTP client recieve MSMQ messages from a queue?

Thats the question. I see examples on sending messages via HTTP but how do I get messages via HTTP from a queue.

If it supports getting messages via HTTP is it a normal get HTTP request that would be blocked by a firewall or ??




VS2008 WPF Xaml: Is there a path length limit when loading an assembly?



It seems that there is a path lenght limit for VS2008 when loading XAML assemblies.

Using the Microsoft sample Southridge, if the project is stored on "C:\Projects\C# samples\Southridge_Labs\1.Southridge_Fundamentals\Start" the designer does not load the assemblies.

But if I copy my files the project to the root (C:\Southridge_Labs\1.Southridge_Fundamentals\Start) then it works fine.

Basically I have solved my problem, but I want to know if there is an EXPLICIT limit and I cannot find any information related.

Thanks for your help.

Secure messages via MSMQ queue when using local system and local user accounts


I am trying to send a message to a WCF service via a private MSMQ queue.  With security turned off, there's no problem.  With security turned on and using a normal user account (one registered with the Active Directory) to send messages, there's no problem.  However, if I use either the local system account or a local user account, it fails.

If I use a local user account it fails with the message:

Unhandled Exception: System.ServiceModel.MsmqException: An error occurred while sending to the queue: Unrecognized error -1072824272 (0xc00e0030).Ensure that MSMQ is installed and running. If you are sending to a local queue, ensure the queue exists with the required access mode and authorization.

If I use the local system account, no exception is thrown, but nothing is delivered to the service, and the queue remains empty.

Both "Everyone" and SYSTEM have permissions to "Get Properties", "Get Permissions" and "Send Message" as regards the private queue.

I am thinking there must be an issue with the queue failing to authenticate the users in the Active Directory, but given it's a private queue, I didn't think it would do that?

I seem to be having the same problems as a previous

GridView Sorting/Paging : 'REAL' AJAX with Asp.Net Series

This is a continuation of my 'REAL' AJAX with Asp.Net (not Asp.Net AJAX) series posts for those of us trying to stop relying on Asp.Net 'AJAX'.

Ok, nothing too dramatic to start things off, we are going to make some tabled data sortable and pagable all without using a bit of postback. Not only that, but it is going to be incredibly easy!

Invalid length for a Base-64 char array for my coding in ASP.net C#. How to solve it ?


Hi Friends ,

I have done encrypted password and decode but i got error  like  this  " Invalid length for a Base-64 char array" .

Pls help . Thanks


psswd = txtPassword.Text;

pwed = base64Decode(psswd);

public string base64Decode(string sData)
            System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
            System.Text.Decoder utf8Decode = encoder.GetDecoder();
            byte[] todecode_byte = Convert.FromBase64String(sData);
            int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
            char[] decoded_char = new char[charCount];
            utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
            string result = new String(decoded_char); return result;

AppFabric Cache: Real-World Usage and Integration


Windows Server AppFabric provides a distributed cache for both web and desktop applications. Well show you how to integrate AppFabric caching into your apps, along with some hints for taking advantage of new cache features in the .NET Framework 4.

Andrea Colaci

MSDN Magazine June 2010

Real-World WF: Best Practices For Windows Workflow Foundation Apps


The heart of Windows Workflow Foundation is its declarative programming model. Here are some best practices to consider when using WF to realize software solutions in the real world.

Josh Lane

MSDN Magazine December 2008

Office Development: OBA Solution Patterns In The Real World


OBA solution patterns help architects and developers build Office Business Applications (OBAs). This article introduces the seven core OBA solution patterns and applies one to a real-world problem.

Steve Fox

MSDN Magazine March 2008

Toolbox: Automated Build Process, Real-World E-Mail Tasks, and More


While the Visual Studio® Build menu's Build Solution option is the usual way developers compile their current work on a project, the process of building the complete solution for testing, deployment, or production often requires many more steps.

Scott Mitchell

MSDN Magazine March 2006

Design Patterns: Simplify Distributed System Design Using the Command Pattern, MSMQ, and .NET


Service-oriented architecture is a great framework when you need to perform distributed computing tasks over the Internet. But when you want to perform processing inside your local network, a different solution may provide a better fit. That solution, based on the Command pattern, uses Windows services and Microsoft Message Queuing to implement a queued system that meets your needs better than a service-oriented solution. This article explains how to build it.

Brad King

MSDN Magazine September 2004

Code Name Avalon: Create Real Apps Using New Code and Markup Model


The presentation subsystem in the next version of Windows, code-named "Longhorn," offers powerful new capabilities to developers. This subsystem, code-named "Avalon," allows developers to take advantage of its capabilities through a new markup language code-named "XAML." In addition, modern object-oriented programming languages such as C# and Visual Basic .NET can be used to tie everything together. Because most applications written to Avalon will probably be a mix of XAML and programming code, this article discusses XAML tags used to control page layout along with the procedural code written to respond to events.

Charles Petzold

MSDN Magazine January 2004

MSMQ and .NET: Send MSMQ Messages Securely Across the Internet with HTTP and SOAP


When creating a distributed system you frequently need to provide for communication between two entities that are not in sync. Microsoft Message Queue Server (MSMQ) provides the kind of store-and-forward messaging in a pre-built infrastructure that can help you address these kinds of messaging needs. In the past, MSMQ was accessed using a COM wrapper. Now there's a .NET wrapper that lets you accomplish your messaging goals easily from your Framework-based code. To illustrate the use of the wrapper, the author builds a messaging application, sends MSMQ messages over the Web, and discusses messaging security.

David S. Platt

MSDN Magazine December 2003

Real-World XML: Manipulate XML Data Easily with the XPath and XSLT APIs in the .NET Framework


XPath is emerging as a universal query language. With XPath, you can identify and process a group of related nodes in XML-based data sources. XPath provides an infrastructure that is integral to XML support in the .NET Framework. The XPath navigation model is even used under the hood of the XSLT processor. In this article, the author reviews the implementation details of the XPath navigator and the XSLT processor and includes practical examples such as asynchronous transformations, sorted node-sets, and ASP.NET server-side transformations.

Dino Esposito

MSDN Magazine July 2003

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend