Fast innbúgv til Skúladepilin við Marknagil

Exception in template (\Designs\LV\Paragraph\include-epos.cshtml): System.Net.WebException: The operation has timed out
   at System.Net.HttpWebRequest.GetResponse()
   at CompiledRazorTemplates.Dynamic.dffffafcdcaac.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag)
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, DynamicViewBag viewBag, String cacheName)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@using System.Xml.Linq @using System.Xml @using System.Linq @using System.Net @{ HttpWebRequest rq = WebRequest.Create("") as HttpWebRequest; //3 Second Timeout rq.Timeout = 3000; //Also note you can set the Proxy property here if required; sometimes it is, especially if you are behind a firewall - rq.Proxy = new WebProxy("proxy_address"); HttpWebResponse response = rq.GetResponse() as HttpWebResponse; XmlTextReader reader = new XmlTextReader(response.GetResponseStream()); XmlDocument xml = new XmlDocument(); xml.Load(reader); XmlNodeList nodes = xml.SelectNodes("//JobOffer"); int starvtal = 0; } @foreach(XmlNode node in nodes){ starvtal++; } @if(starvtal==0){ <text><style> #toptopmen li.Størv a:after {display: none;} </style> </text> } else{ <text><style> #toptopmen li.Størv a:after {content: "@starvtal";} </style> </text>}