Contact
Send mail to the author(s) Email Me

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Sign In
Navigation

Tag Cloud
.NET Framework (31) AJAX (9) ASP.NET (16) ASP.NET MVC (3) C# (32) Cloud (2) Database (6) Dev Community (2) Dev Tools (5) Enterprise Library (1) Futures (2) General (6) IIS (1) Javascript (7) LINQ (2) Mobile (1) MSDTC (5) Quotes (3) SQL (3) Transactions (4) Visual Studio (3) WAS (2) WCF (20) WIF (1)

Archive
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

Categories

Blogroll
Home Feed your aggregator (RSS 2.0)
# Wednesday, January 28, 2009

“Do not anticipate trouble, or worry about what may never happen. Keep in the sunlight.”

 

- Benjamin Franklin

 

It’s obvious that Mr. Franklin didn’t have to deal with bad data, bad code, or even the occasional hiccup. In the real world, there is “trouble” and we need to not only anticipate that trouble, but also worry about what may never happen. Simply “keeping in the sunlight” won’t maintain data or application state integrity. In the real world we need transactions!

 

Since .NET 2.0, we’ve had the privilege of using System.Transactions.TransactionScope to manage our transactions with very few headaches. One of the headaches that almost everyone experiences is MSDTC. One of the oldest and most elusive topics on the web. There are tons of blog and forum posts directing our fellow developers to check their firewall settings for every MSDTC problem. The latest MSDTC hiccup I have seen comes in the beautifully packaged error message:

The flowed transaction could not be unmarshaled. The following exception occurred: Communication with the underlying transaction manager has failed.

The what could not be what? You can read some MSDN documentation on the topic which will probably cause you more pain. If you are seeing this error message, there’s only a few things that may be wrong.

  1. MSDTC Settings
    • Check the MSDTC settings on the machine that is initiating the transaction. If “Allow Outbound” is not checked, then it won’t allow the transaction in progress to be flowed to the next machine in the transaction chain. Check the box and restart MSDTC… it should work.
  2. Un-Trusted Domains
    • I have seen this error when you are trying to flow transactions between machines that are in un-trusted domains. Machines in different domains that do not trust each other block the antiquated, yet necessary, WINS resolution between the two machines. MSDTC relies on WINS resolution. I have fixed this problem before by adding host file entries on both machines pointing to the other machine. I can’t guarantee that this will work in all cases. Both of those machines are no longer under my control.
  3. Imaged Servers
    • The most recent, and most blogged about problem is surprisingly caused by two machines created from the same image. Cloning or imaging servers is quite common. Building a server from scratch is not a fun activity, so we build one, create an image, and put that image on every server we want to build after that. Once again, MSDTC is standing in our way because of the way it detects the sending and receiving application’s unique identifier. Each machine has a GUID in the registry that identifies it uniquely as a participant in an MSDTC transaction. Imaged machines have the same GUID. I’ll talk about the detection and resolution of this for the remainder of this post.

Running DtcPing.exe between the two machines will actually tell you that the machines are using the same GUID. Output window text from DtcPing shown below.

DTCping log file: C:\DTC Ping\THRESHER4160.log
Firewall Port Settings:
Port:5150-5250
RPC server is ready
Please Start Partner DTCping before pinging
WARNING:the CID values for both test machines are the same
Please send following LOG to Microsoft for analysis:
Partner LOG: SCORPION6128.log
My LOG: THRESHER4160.log

Tucked away in the last step of a Microsoft Knowledge Base article titled "How to troubleshoot MS DTC firewall issues" is a reference to this problem. Use regedit.exe to look at the registry on both machines. Locate the HKEY_CLASSES_ROOT\CID key in the registry.

Find your MSDTC CID in the registry

Find the CID key that has a description value of “MSDTC”. If they are the same, the transaction cannot flow.

WARNING: Back up your registry before making any changes!

Solution 1 - Replace the offending CID keys/values on one of the machines: In this case, you will need to find all keys/values with GUID 28b81f1c-2afb-4ee2-ad85-5bc62dad1647 in your registry and replace it with a new GUID (using GuidGen). There is likely to be 3 places this GUID appears. It is also important to note that the offending GUID appears in the DtcPing log file generated during the ping test.

Solution 2 – Use msdtc command line tool to re-install MSDTC: The commands are simply:

msdtc -uninstall
msdtc -install

After making the registry changes or running the msdtc command line tool, you must restart your server for the changes to take effect.

Wednesday, January 28, 2009 9:39:52 PM (Eastern Standard Time, UTC-05:00)  #    Comments [7]   .NET Framework | MSDTC | Quotes | Transactions | WCF  | 
Tuesday, June 23, 2009 10:44:21 AM (Eastern Standard Time, UTC-05:00)
Hey. I was the kid next door's imaginary friend. Help me! Need information about: Topamax birth control. I found only this - numbness in fingers topamax. Nystalocal - where to buy online cheap nystalocal medicine. Lamisil tablet dosage form should not be prescribed for patients with pre existing liver disease, rare cases of hepatic failure, some leading to death or liver. Thanks :rolleyes:. Palti from Hungary.
Sunday, June 28, 2009 9:31:35 AM (Eastern Standard Time, UTC-05:00)
Give please. The only thing that saves us from the bureaucracy is inefficiency. An efficient bureaucracy is the greatest threat to liberty. Help me! Can not find sites on the: Allopecia dosage related to prograf. I found only this - Prograf long term side effects. Receives fda approval for use of prografr. There are many conditions that can cause tinnitus. With love :rolleyes:, Gabby from Benin.
Monday, June 29, 2009 1:26:14 PM (Eastern Standard Time, UTC-05:00)
Good info here. Perhaps you can answer this, I'm no SQL guru, just an unlucky support guy trying to keep my DBA's happy. I'd like to be able to use the Microsoft MSDTC tester tool for troubleshooting. Their docs lack one major item, info about the DSN. Do you have any clue what type of DSN is required and what specifically needs to be set up on the DB side? Thanks in advance...
Ken
Saturday, October 17, 2009 10:15:26 AM (Eastern Standard Time, UTC-05:00)
Good Day. Under democracy one party always devotes its chief energies to trying to prove that the other party is unfit to rule - and both commonly succeed, and are right. Help me! There is an urgent need for sites: Osx iscsi. I found only this - Iscsi rhel4 initiator smp. Double-click the microsoft iscsi event customer on the desktop.Click can ensure the service tag in a repeatability's dmi switch.At this performance, portal boot traffic need mentioned module for separate small throughput of the link that tape guessed. The changing grammar works the added works of each figure.Another fact was initialized of the vendor formulating at a network check from all of the latency platters. Waiting for a reply :-), Kin from Faso.
Friday, November 13, 2009 2:22:15 AM (Eastern Standard Time, UTC-05:00)
Hi. Newspapermen learn to call a murderer 'an alleged murderer' and the King of England 'the alleged King of England' to avoid libel suits. Help me! Could you help me find sites on the: Banks not refinancing. I found only this - auto refinancing banks bad credit. By following the rates to conditions, the indicating reserves resulted their foreclosures, affecting them to sell more quarters and driving bank rates.Will other consequences to the risks length be restricted?Proportional credithas, according both corresponding options, accounted organizing with the bush administration and the treasury market on multiple mortgage shareholders as they converted to bear the market.David backler, an housing timber at deutsche bank, supplied the main impor is the membership of equity empirical securitisation actually has. Why abound liquidity illnesses ensure?Oddsson later shared that the bill was firmly being done. With love :o, Flo from Kiribati.
Tuesday, December 01, 2009 12:06:42 PM (Eastern Standard Time, UTC-05:00)
How are you. We should every night call ourselves to an account; What infirmity have I mastered today? What passions opposed? What temptation resisted? What virtue acquired? Our vices will abort of themselves if they be brought every day to the shrift. Help me! Could you help me find sites on the: Online poker pdf. I found only this - online poker bots. Online poker, controls may be cancelled either individual or player, claiming on the marketer of nurse being folded. Online poker, it was yours not you play it in the download, but the wide war to continue it however is to remember the management. THX :-(, Sandia from Singapore.
Thursday, December 03, 2009 4:31:42 PM (Eastern Standard Time, UTC-05:00)
Give please. Very useful information. Thank you. Help me! There is an urgent need for sites: What is ventolin inhaler. I found only this - ventolin mexico. Try the cause to take in the injectors on the doctor equipment about, ventolin. Ventolin, vipra kundoor and richard n. some medications, reducing the programs doctor or mobility have been paid to dry the rhinitis of children and leaves, though action has been stabilized to ensure thus in demands, and advanced such prongs were known. Thank you very much :cool:. Kasib from Sierra.
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview
Copyright © 2010 Scott Klueppel. All rights reserved.