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)
   at Newtonsoft.Json.Linq.JObject.Parse(String json)
   at CompiledRazorTemplates.Dynamic.eddcccbaabdbdfe.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 skanskamaskin.se.common; @using skanskamaskin.se.Helper; @using System.IO; @using System.Web; @using Newtonsoft.Json; @using Newtonsoft.Json.Linq; @{ HandleBarsHelper hbh = new HandleBarsHelper(); String nameInputHtml; String emailInputHtml; String companyInputHtml; String phoneInputHtml; String messageInputHtml; List<object> inputAttrs = new List<object>(); Int16 selectedStoreId; JsonSerializerSettings settings = new JsonSerializerSettings(); String input = new StreamReader(HttpContext.Current.Request.InputStream).ReadToEnd(); JObject json = JObject.Parse(input); selectedStoreId = Convert.ToInt16(json["store"]); Dynamicweb.Modules.UserManagement.User selectedStore = Dynamicweb.Modules.UserManagement.User.GetUserByID(selectedStoreId); Dynamicweb.Modules.UserManagement.UserCollection 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 } }; /*Namn*/ inputAttrs.Add( new { prop = "required" } ); var inputNameData = new { type = "text", label = "Ditt Namn", uid = "sharelist-name", name = "sharelist-name", isFullWidth = true, attrs = inputAttrs }; nameInputHtml = hbh.render("form-input/index.hbs", inputNameData); /*Företag*/ inputAttrs.Add( new { prop = "required" } ); var inputCompanyData = new { type = "text", label = "Företagsnamn", uid = "sharelist-company", name = "sharelist-company", isFullWidth = true, attrs = inputAttrs }; companyInputHtml = hbh.render("form-input/index.hbs", inputCompanyData); /*Email*/ inputAttrs.Add( new { prop = "required" } ); var inputEmailData = new { type = "email", label = "Din e-post", uid = "sharelist-email", name = "sharelist-email", isFullWidth = true, attrs = inputAttrs }; emailInputHtml = hbh.render("form-input/index.hbs", inputEmailData); /*Telefon*/ inputAttrs.Add( new { prop = "required" } ); var inputPhoneData = new { type = "tel", label = "Mobilnummer", uid = "sharelist-phone", name = "sharelist-phone", isFullWidth = true, attrs = inputAttrs }; phoneInputHtml = hbh.render("form-input/index.hbs", inputPhoneData); /*Message*/ List<object> templates = new List<object>(); inputAttrs.Add( new { prop = "required" } ); //templates.Add(new { txt = "" }); 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" }; 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 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>