Skip to content

Unable to cast object of type 'System.Object' to type 'Newtonsoft.Json.Linq.JObject'. #5

@brownrw8

Description

@brownrw8

At line 458 of TestPowerCast/Form1.cs, the cast to JObject is failing.
message = String.Format("The request was not accepted by the PowerCast Hub. Error code: {0} Reason: {1}", response.StatusCode, (**(JObject)responseObject**)["message"]);

Exception thrown is:

An exception of type 'System.InvalidCastException' occurred but was not handled in user code
Unable to cast object of type 'System.Object' to type 'Newtonsoft.Json.Linq.JObject'.

Exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions