Exception in template (\Designs\courlux\Paragraph\ReadPageUriContent.cshtml): System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
   at System.Net.HttpWebRequest.GetResponse()
   at CompiledRazorTemplates.Dynamic.cafffdcbfccde.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateBase.cs:line 126
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 608
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 439
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Razor.cs:line 276
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@using System.IO; @using System.Web; @using System.Net; @using System.Text; @using ithnordic.com.RazorHelper; @using ithnordic.com.Classes.Ip2Country; @using System.Collections.Specialized; @{ string uri = GetString("ParagraphText"); string data = string.Empty; if (!string.IsNullOrEmpty(uri)) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); if (response.StatusCode == HttpStatusCode.OK) { Stream receiveStream = response.GetResponseStream(); StreamReader readStream = null; if (response.CharacterSet == null) { readStream = new StreamReader(receiveStream); } else { readStream = new StreamReader(receiveStream, Encoding.GetEncoding(response.CharacterSet)); } data = readStream.ReadToEnd(); response.Close(); readStream.Close(); } } if (!string.IsNullOrEmpty(data)) { HttpContext.Current.Response.Write(data); } }