From 1f4a3b137886d9e46666132053fdac86d5a509c8 Mon Sep 17 00:00:00 2001 From: Bastiaan Louis Date: Fri, 6 Jan 2017 00:29:30 +0100 Subject: [PATCH] In case of a header with a valu of tpe System.Guid, the untyped value cannot cast to a string. When resubmitting a message (for example from a deadletterqueue to the original queue) the heeaders of type Guid are ignored. --- Helpers/ConversionHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Helpers/ConversionHelper.cs b/Helpers/ConversionHelper.cs index a220853d..e63c7cb9 100644 --- a/Helpers/ConversionHelper.cs +++ b/Helpers/ConversionHelper.cs @@ -123,7 +123,7 @@ public static object MapStringTypeToCLRType(string type, object value) case "Decimal": return Convert.ChangeType(value, typeof(decimal)); case "Guid": - return new Guid(value as string); + return new Guid(value.ToString()); } throw new NotSupportedException(string.Format(TypeNotSupported, type)); }