DCSIMG
Asynchronous Programming with MSMQ: and it's installation issues. - Vladimir Vexler's Blog

Vladimir Vexler's Blog

Strategy & Management, Performance & Scalability, .Net Architecture.

Asynchronous Programming with MSMQ: and it's installation issues.

MSMQ has already been there for while. Actually it has been here at least 5-6 years (that is only the time I am familiar with it).
The Idea of it is pretty simple:

  1. You have an application with some logic.
  2. Part of this logic is to perform asynchronous calls to some other application logic.
  3. You do not wish that it will affect your performance.
  4. The order of handling those calls has to preserve - the FIFO method.

So, back in the begging of the millennium Microsoft released a nice, free of charge, comes with Windows (PC & server), service called MSMQ - Microsoft Message Queuing. It was not the first attempt but it was stable, free, already inside solution.
This is the idea how it works:

  1. Your main application during it's work can send Messages to some queue (in this case, one of queues inside MSMQ,). This is done by using the System.Messages library.
  2. Some other application, a Windows Service for example, listens to this queue.
  3. Each time a new message arrives it reads it and executes some logic.
  4. After reading the message the message is automatically deleted from the Queue.

This is how it looks :

Here are some links of Basic and advanced programming:

  1. Good starting review and examples : Programming MSMQ in .NET : http://www.codeproject.com/dotnet/mgrmsmq.asp
  2. Some more advanced stuff: MSMQ for .NET Developers (Part 1): http://www.devx.com/dotnet/Article/27560/0/page/1
  3. Some more advanced-advanced stuff :-) : MSMQ for .NET Developers, Part 2: http://www.devx.com/dotnet/Article/27922

 

How to install MSMQ?

Installation process is quite easy (you might need your Windows installation disk):

  1. Control Panel
  2. Add or Remove Programs
  3. Add/Remove Windows Components (on the left sidebar)
  4. Select "Message Queuing"
  5. Next, Finish

 

Sometimes happens this installation issue/problem :
This issue happened to me yesterday, when I was trying to install the MSMQ on my newly formatted computer:
"
The MSMQ Service cannot be started.

Error Code: 0x42C
Error Description: The dependency service or group failed to start.
"

This is what you need to do:

  1. Start button
  2. Run
  3. services.msc - Open the services console
  4. Enable this service "NT LM Security Support Provider". In addition, set it to Manual mode
  5. Install MSMQ again

 

Hope this helps,
Vladi

 

Comments

whistler Kim said:

Thank you for your information about message queuing problem..

Thank you :-)

# July 2, 2008 6:20 AM

Mike said:

"This is what you need to do:

Start button

Run

services.msc - Open the services console

Enable this service "NT LM Security Support Provider". In addition, set it to Manual mode

Install MSMQ again"

I wish this worked, but it did not. This is the only solution I find, and it does not work for me. Is there more to this service than others are aware of? I can only assume that "NT LM Security Support Provider" is not the only service that has an effect on MSMQ. Any ideas?

# October 29, 2008 4:09 AM

Han Stehmann said:

It worked for me.

NT LM Security Support Provider was DISABLED. By setting it to MANUAL it was still not active (STARTED) but apperently good enough to install the MSMQ.

# December 10, 2008 2:01 PM

Tachibana said:

Playing with NT LM Security Support Provider didn't helped. But I found in Event viewer:

MS DTC log file not found. After ensuring that all Resource Managers coordinated by MS DTC have no indoubt transactions, please run msdtc -resetlog to create the log file.

Run "msdtc -resetlog" in command prompt, it should work.

# February 7, 2009 9:29 PM

dude said:

still no luck for me, I can't start it. Tried msdtc -resetlog though and the command went through without an error. Yet it still gives same error message. Must be some other dependency.

# March 1, 2009 1:14 PM

rusvdw said:

I had the same issues and eventually found the answer in the Event Viewer.

Try making sure that the "Distributed Transaction Coordinator" service is running before installing MSMQ.

That solved it for me.

# March 25, 2009 1:49 PM

smahendra said:

Starting Distributed Transaction Coordinator service worked for me.

# October 27, 2009 12:37 PM

HAVA BEN HARUSH said:

THANKS ALOT TO rusvdw YOUR SOLOUTUION SAVE ME LOTS OF TROUBLE

"Try making sure that the "Distributed Transaction Coordinator" service is running before installing MSMQ."

# December 12, 2009 10:44 PM

Jerry said:

msdtc -resetlog FINALLY!! IT WORKED

# February 17, 2010 3:57 AM

Rei said:

Thanks a bunch! This fixed my Error Code: 0x42C!! Thanks!! Yay!

It worked.!

# January 12, 2011 7:00 AM

Vijaykumar said:

Thanks it's working........

# February 9, 2011 2:49 PM

Jamal ELGHRIB said:

thanks a lot it's working with "Distributed Transaction Coordinator"

# March 2, 2011 6:21 PM

bruno said:

Thanks for that! it helped me big time.

# May 9, 2011 7:34 PM

harikumar said:

Thanks for your post, its working for me after i started Distribution service......

# October 5, 2011 10:42 AM

Azli said:

Thanks for ur help... by enable it "Distributed Transaction Coordinator"

# March 14, 2012 9:22 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: