Exception in template (Designs\SkanskaMaskin\Paragraph\_form_customerservice.cshtml): Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Path '', line 0, position 0.
   at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
   at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
   at CompiledRazorTemplates.Dynamic.eedcdfcca.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.Output()
@using Softgear.SkanskaMaskin.Se.Helpers; @using Newtonsoft.Json; @using Newtonsoft.Json.Linq; @using Softgear.SkanskaMaskin.Data.Business @using System.IO; @using System.Web; @using Softgear.SkanskaMaskin.Data.Entities.Common @using Attribute = Softgear.SkanskaMaskin.Data.Entities.Common.Attribute @{ var hbh = new HandleBarsHelper(); var inputAttrs = new List<object>(); var input = new System.IO.StreamReader(HttpContext.Current.Request.InputStream).ReadToEnd(); var json = JObject.Parse(input); var selectedStoreId = Convert.ToInt16(json["store"]); var selectedStore = Dynamicweb.Modules.UserManagement.User.GetUserByID(selectedStoreId); var customerCenters = CacheManager.GetFromCache<Dynamicweb.Modules.UserManagement.UserCollection>(60, "customerCentersGroup4", () => Dynamicweb.Modules.UserManagement.User.GetUsersByGroupID(4)); var storesData = new { baseUrl = "/service/storeinfo?storeid=", className = "Control--light", name = "selectedStore", updateRegion = "#js-id-controlUpdateRegion", redirect = "false", items = from user in customerCenters select new { value = user.ID, text = user.Name, selected = user.ID == selectedStoreId } }; var inputNameData = new Input{ type = "text", label = "Ditt Namn", uid = "sharelist-name", name = "sharelist-name", isFullWidth = true, attrs = new List<Attribute> { new Attribute { prop = "required"} } }; var nameInputHtml = hbh.render("form-input/index.hbs", inputNameData); var inputCompanyData = new Input { type = "text", label = "Företagsnamn", uid = "sharelist-company", name = "sharelist-company", isFullWidth = true, attrs = new List<Attribute> { new Attribute { prop = "required"} } }; var companyInputHtml = hbh.render("form-input/index.hbs", inputCompanyData); var inputEmailData = new Input { type = "email", label = "Din e-post", uid = "sharelist-email", name = "sharelist-email", isFullWidth = true, attrs = new List<Attribute> { new Attribute { prop = "required"} } }; var emailInputHtml = hbh.render("form-input/index.hbs", inputEmailData); var inputPhoneData = new Input{ type = "tel", label = "Mobilnummer", uid = "sharelist-phone", name = "sharelist-phone", isFullWidth = true, attrs = new List<Attribute> { new Attribute { prop = "required"} } }; var phoneInputHtml = hbh.render("form-input/index.hbs", inputPhoneData); var orgNrInputHtml = hbh.render("form-input/index.hbs", new Input("Organisationsnummer", "order-orgnr", "", false)); var projectNrInputHtml = hbh.render("form-input/index.hbs", new Input("Kundnummer (projektnummer)", "order-projectnr", AccountManager.getActiveProjectCode(), false)); var invoiceAdressInputHtml = hbh.render("form-input/index.hbs", new Input("Adress", "invoice-adress", "", false)); var invoiceZipInputHtml = hbh.render("form-input/index.hbs", new Input("Postnr", "invoice-zip", "", false)); var invoiceCityInputHtml = hbh.render("form-input/index.hbs", new Input("Ort", "invoice-city", "", false)); var deliveryAdressInputHtml = hbh.render("form-input/index.hbs", new Input("Adress", "invoice-adress", "", false)); var deliveryZipInputHtml = hbh.render("form-input/index.hbs", new Input("Postnr", "invoice-zip", "", false)); var deliveryCityInputHtml = hbh.render("form-input/index.hbs", new Input("Ort", "invoice-city", "", false)); var referenceInputHtml = hbh.render("form-input/index.hbs", new Input("Referens", "order-reference", "", false)); var deliveryDateInputHtml = hbh.render("form-input/index.hbs", new Input("Önskad leveransdatum, -tid", "order-delivery-date", "", false)); var invoiceTagInputHtml = hbh.render("form-input/index.hbs", new Input("Fakturamärkning", "order-invoice-tag", "", false)); /*Message*/ var templates = new List<object>(); inputAttrs.Add( new { prop = "required" } ); var inputMessageData = new { type = "text", label = "Meddelande", uid = "sharelist-message", name = "sharelist-message", isTextarea = true, isFullWidth = true, attrs = inputAttrs, template = templates }; var partialPathList = new List<string> { "form-input/textarea.hbs" }; var messageInputHtml = hbh.render("form-input/index.hbs", partialPathList, inputMessageData); } <!--<form action="/customerservice_confirm" method="post">--> <form action="/default.aspx?id=32" method="post"> <div class="Grid Grid--equalPush"> <div class="Grid-cell"> <div class="Grid Grid--withGutter"> <div class="Grid-cell u-sizeFull"> <h2 class="Type-h1">Skicka orderförfrågan</h2> </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> <p>Fyll i dina kontaktuppgifter så återkommer vi till dig nästa vardag med prisuppgifter och leveranstider.</p> </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @hbh.render("control/index.hbs", storesData) </div> </div> </div> <div class="Grid-cell"> <div class="Grid Grid--withGutter" id="js-id-controlUpdateRegion"> <div class="Grid-cell u-sizeFull u-md-size1of3 u-lg-size1of3"> <h4>Besöksadress</h4> <p class="Type-paragraph">@selectedStore.Address</p> </div> <div class="Grid-cell u-sizeFull u-md-size1of3 u-lg-size1of3"> <h4>Öppettider</h4> <p class="Type-paragraph">@selectedStore.Item["Opening_Hours"]</p> </div> <div class="Grid-cell u-sizeFull u-md-size1of3 u-lg-size1of3"> <h4>Telefon</h4> <p class="Type-paragraph">@selectedStore.Phone</p> </div> </div> </div> <div class="Grid-cell"> <div class="Grid Grid--withGutter"> <div class="Grid-cell u-sizeFull"> <div class="Type"> <h3 class="Type-h3">Kontaktuppgifter</h3> </div> </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @nameInputHtml </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @companyInputHtml </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @emailInputHtml </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @phoneInputHtml </div> </div> </div> <div class="Grid-cell"> <div class="Grid Grid--withGutter"> <div class="Grid-cell u-sizeFull"> <div class="Type"> <h3 class="Type-h3">Fakturaadress</h3> </div> </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @invoiceAdressInputHtml </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @invoiceZipInputHtml </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @invoiceCityInputHtml </div> </div> </div> <div class="Grid-cell"> <div class="Grid Grid--withGutter"> <div class="Grid-cell u-sizeFull"> <div class="Type"> <h3 class="Type-h3">Leveransadress</h3> </div> </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @deliveryAdressInputHtml </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @deliveryZipInputHtml </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @deliveryCityInputHtml </div> </div> </div> <div class="Grid-cell"> <div class="Grid Grid--withGutter"> <div class="Grid-cell u-sizeFull"> <div class="Type"> <h3 class="Type-h3">Övrigt</h3> </div> </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @referenceInputHtml </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @deliveryDateInputHtml </div> <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> @invoiceTagInputHtml </div> <div class="Grid-cell u-sizeFull"> @messageInputHtml </div> </div> </div> <div class="Grid-cell"> <div class="Grid Grid--withGutter"> <div class="Grid-cell u-sizeFull u-textRight"> <button class="Button" type="submit">Skicka förfrågan</button> </div> </div> </div> </div> </form>