2016-07-11 13 views
1

Ich habe gerade vor kurzem einen Fehler in meinen Diagnose-Tool für Visual Studio 2015Diagnosetools-Fehler Newtonsoft.Json.JsonReaderException: Unerwartetes Zeichen beim Parsen von Wert: <. Pfad '', Zeile 0, Position 0

Newtonsoft.Json.JsonReaderException wurde immer: Unerwartetes Zeichen auf beim Wert analysiert: <. Pfad '', Zeile 0, Position 0.

Ich habe die Protokollierung für das Tool aktiviert und habe die folgende Stacktrace, sieht aus wie es etwas mit DataWarehouseRestWebHost zu tun hat, da der Fehler auftritt, nachdem die Tools eine Anfrage

ausgibt
System.AggregateException: One or more errors occurred. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. 
    at Newtonsoft.Json.JsonTextReader.ParseValue() 
    at Newtonsoft.Json.JsonTextReader.ReadInternal() 
    at Newtonsoft.Json.JsonTextReader.Read() 
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter) 
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) 
    at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) 
    at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) 
    at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) 
    at Microsoft.DiagnosticsHub.VisualStudio.DataWarehouseRestWebHost.<ProcessErrorResponse>d__8.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 
    at Microsoft.DiagnosticsHub.VisualStudio.DataWarehouseRestWebHost.<Request>d__7.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at Microsoft.DiagnosticsHub.VisualStudio.DataWarehouse.DataWarehouseInstance.<InitializeDataWarehouseInternal>d__52.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at Microsoft.DiagnosticsHub.VisualStudio.Collectors.CollectorService.StandardClientCollector.<OnStartCollection>d__27.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) 
    at Microsoft.DiagnosticsHub.VisualStudio.Runtime.PerformanceDebuggerSession.<StartCollectionAsync>d__13.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at Microsoft.DiagnosticsHub.Sessions.SessionBase.<>c__DisplayClass51_0.<<ContinueCurrentTaskWith>b__0>d.MoveNext() 
--- End of inner exception stack trace --- 
---> (Inner Exception #0) Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. 
    at Newtonsoft.Json.JsonTextReader.ParseValue() 
    at Newtonsoft.Json.JsonTextReader.ReadInternal() 
    at Newtonsoft.Json.JsonTextReader.Read() 
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter) 
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) 
    at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) 
    at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) 
    at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) 
    at Microsoft.DiagnosticsHub.VisualStudio.DataWarehouseRestWebHost.<ProcessErrorResponse>d__8.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 
    at Microsoft.DiagnosticsHub.VisualStudio.DataWarehouseRestWebHost.<Request>d__7.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at Microsoft.DiagnosticsHub.VisualStudio.DataWarehouse.DataWarehouseInstance.<InitializeDataWarehouseInternal>d__52.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at Microsoft.DiagnosticsHub.VisualStudio.Collectors.CollectorService.StandardClientCollector.<OnStartCollection>d__27.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) 
    at Microsoft.DiagnosticsHub.VisualStudio.Runtime.PerformanceDebuggerSession.<StartCollectionAsync>d__13.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at Microsoft.DiagnosticsHub.Sessions.SessionBase.<>c__DisplayClass51_0.<<ContinueCurrentTaskWith>b__0>d.MoveNext() 

Antwort

1

Späte Antwort, aber besser als keine Antwort vielleicht könnte es anderen helfen. Ich löse dieses Problem, indem ich die Eigenschaft "URL ENCODE" der Formularnachbearbeitungsparameter auf False setze.

Dies liegt daran, dass JSON-Form Post-Parameter nicht HTML-codiert werden müssen.

Verwandte Themen