Tilmeld dig vores nyhedsbrev
Exception in template (Designs\Hatting_KS_2013\Paragraph\mailchimp.cshtml): System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at MailChimp.Net.Logic.ListLogic.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MailChimp.Net.Logic.ListLogic.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Application.CustomModules.MailChimpHandler.d__0.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at CompiledRazorTemplates.Dynamic.dffbaccefcdbb.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, String cacheName)
   at Dynamicweb.Rendering.Template.Output()
---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at MailChimp.Net.Logic.ListLogic.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MailChimp.Net.Logic.ListLogic.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Application.CustomModules.MailChimpHandler.d__0.MoveNext()<---

@using Application.CustomModules; @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @{ string MainText = GetString("Item.MainText"); string CategoryText = GetString("Item.SelectCategoryText"); var user = Dynamicweb.Frontend.PageView.Current().User.UserID; string SegmentType = "Erhverv"; MailChimpHandler MailChimp = new MailChimpHandler(); var MCGroups = MailChimp.MCGroups(SegmentType); var Id = MCGroups.Result.FirstOrDefault().Segment_ListId; } <div id="NewsletterSubscribeContent"> @MainText <form name="NewsletterSubscribe" id="NewsletterSubscribe" action="/" method="post" enctype="multipart/form-data"> <input name="MC_ID" type="hidden" id="MC_ID" value="@Id" /> <input name="PID" type="hidden" id="PID" value="@GetString("ParagraphID")" /> <div class="newsletterForm checkout"> <div class="form-group"> <label class="col-sm-2 control-label">Navn</label> <div class="col-sm-10"> <input name="MC_Name" type="text" id="MC_Name"> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label">E-mail adresse</label> <div class="col-sm-10"> <input name="MC_Email" type="text" id="MC_Email" autocapitalize="off"> </div> </div> <!--categories start--> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <p><br>@CategoryText</p> </div> </div> <div id="errormessages"> <div class="col-sm-offset-2 col-sm-10"> <p></p> </div> </div> @foreach (MCSegments Groups in MCGroups.Result.OrderBy(x => x.Segment_Name)) { string Value = Groups.Segment_Id; string Name = "MC_Groups"; string ID = "MC_Groups" + Groups.Segment_Id; <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <div class="checkbox"> <label for="@ID"> <input id="@ID" name="@Name" type="checkbox" value="@Value"> @Groups.Segment_Name </label> </div> </div> </div> } <!--categories end--> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <input type="submit" class="newsletterSubmit btn btn-default" id="submitter" value="Tilmeld"> </div> </div> </div> </form> </div>