From 4dc4698b6ca598fd1dc952aad85d5e0ac77af305 Mon Sep 17 00:00:00 2001 From: Shandem Date: Wed, 20 Oct 2010 12:16:08 +0000 Subject: [PATCH] merge issue [TFS Changeset #78665] --- umbraco/presentation/macro.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/umbraco/presentation/macro.cs b/umbraco/presentation/macro.cs index 5e3c1eadbe..e83466dad8 100644 --- a/umbraco/presentation/macro.cs +++ b/umbraco/presentation/macro.cs @@ -1485,6 +1485,13 @@ namespace umbraco querystring; HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url); + + // propagate the user's context + HttpCookie inCookie = HttpContext.Current.Request.Cookies["UserContext"]; + Cookie cookie = new Cookie(inCookie.Name, inCookie.Value, inCookie.Path, HttpContext.Current.Request.ServerVariables["SERVER_NAME"]); + myHttpWebRequest.CookieContainer = new CookieContainer(); + myHttpWebRequest.CookieContainer.Add(cookie); + // Assign the response object of 'HttpWebRequest' to a 'HttpWebResponse' variable. HttpWebResponse myHttpWebResponse = null; try @@ -1519,7 +1526,7 @@ namespace umbraco // Release the HttpWebResponse Resource. myHttpWebResponse.Close(); } - catch + catch (Exception ee) { retVal = "No macro content available for WYSIWYG editing"; }