From 8ade52ca0723766a5487488020d1c42396e979fc Mon Sep 17 00:00:00 2001 From: hartvig Date: Tue, 28 Sep 2010 07:54:40 +0000 Subject: [PATCH] Fixes issue with "No content available for WYSIWYG editing". Kudos to Our Umbraco user @Stephen for helping with a fix [TFS Changeset #77552] --- umbraco/presentation/macro.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/umbraco/presentation/macro.cs b/umbraco/presentation/macro.cs index 959aeb5f9c..33c9537685 100644 --- a/umbraco/presentation/macro.cs +++ b/umbraco/presentation/macro.cs @@ -1464,6 +1464,12 @@ namespace umbraco querystring; HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url); + HttpCookie inCookie = HttpContext.Current.Request.Cookies["UserContext"]; + string domain = HttpContext.Current.Request.ServerVariables["SERVER_NAME"]; + Cookie cookie = new Cookie(inCookie.Name, inCookie.Value, inCookie.Path, domain); + myHttpWebRequest.CookieContainer = new CookieContainer(); + myHttpWebRequest.CookieContainer.Add(cookie); + // Assign the response object of 'HttpWebRequest' to a 'HttpWebResponse' variable. HttpWebResponse myHttpWebResponse = null; try @@ -1498,7 +1504,7 @@ namespace umbraco // Release the HttpWebResponse Resource. myHttpWebResponse.Close(); } - catch + catch (Exception ee) { retVal = "No macro content available for WYSIWYG editing"; }