Created
March 15, 2011 16:00
-
-
Save gabehesse/870932 to your computer and use it in GitHub Desktop.
Get the MSMQ messageid of the current operation when using WCF netmsmqbinding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MsmqMessageProperty msmqMessageProperty = (MsmqMessageProperty)OperationContext.Current.IncomingMessageProperties[MsmqMessageProperty.Name]; | |
Type myType = typeof(MsmqMessageProperty); | |
PropertyInfo myPropInfo2 = myType.GetProperty("MessageId", BindingFlags.NonPublic | BindingFlags.Instance); | |
Console.WriteLine("Received message with MessageId: {0}", (string)myPropInfo2.GetValue(msmqMessageProperty, null)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment