mohd-ismail-siddiqui / PVABotConnector

0 stars 0 forks source link

Need to serialize and reserialize DirectLineClient object #1

Open mohd-ismail-siddiqui opened 3 years ago

mohd-ismail-siddiqui commented 3 years ago

Hi @JasonSowers,

Facing an issue when I am connecting my Bot Framework SDK bot to PVA(Power Virtual Agent) Bot(Child bot) using directlineclient object. As this object is used to make a websocket connection between both Bots.

But as my Main bot is based on HTTP protocol, each request is a unique request. Hence it needs to save websocket connection (in this case direclineclient object). But facing an issue while serialization and deserialization of directlineclient object.

       `
          Unable to find a constructor to use for type Microsoft.Bot.Connector.DirectLine.DirectLineClient. A class should either have a 
          default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 
          'BaseUri', line 1, position 11.

            at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract 
           objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& 
           createdFromNonDefaultCreator)
           at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract 
           contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object               
            existingValue)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean               
          checkAdditionalContent)
          at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
          at Newtonsoft.Json.JsonSerializer.Deserialize(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 PVABotConnector.TestChildBotHandler.<GetBotResponse>d__14.MoveNext() in                             
          E:\Workspace\Practice\PVABotConnector\PVABotConnector\TestChildBotHandler.cs:line 78

`

Please help me to resolve this issue

JasonSowers commented 3 years ago

Sorry, I don't even work at Microsoft anymore. I also have no idea what PVA is. Good luck.

mohd-ismail-siddiqui commented 3 years ago

@JasonSowers : No issue, can you tell me from whom I can ask the same question or if possible you can assign someone.

mohd-ismail-siddiqui commented 3 years ago

@EricDahlvang, Could you please help me in this case.