diff --git a/MeshCentralServer.cs b/MeshCentralServer.cs index 93a7b7b..a33bc91 100644 --- a/MeshCentralServer.cs +++ b/MeshCentralServer.cs @@ -66,6 +66,7 @@ namespace MeshCentralRouter public int twoFactorCookieDays = 0; public Dictionary userRights = null; public Dictionary userGroups = null; + private JavaScriptSerializer JSON = new JavaScriptSerializer(); // Mesh Rights /* @@ -137,6 +138,7 @@ namespace MeshCentralRouter // Starts the routing server, called when the start button is pressed public void connect(Uri wsurl, string user, string pass, string token) { + JSON.MaxJsonLength = 217483647; this.user = user; this.pass = pass; this.token = token; @@ -196,7 +198,7 @@ namespace MeshCentralRouter Dictionary jsonAction = new Dictionary(); try { - jsonAction = new JavaScriptSerializer().Deserialize>(data); + jsonAction = JSON.Deserialize>(data); } catch (Exception ex) { if (debug) { try {