title: Botstate.SetConversationData - Unexpected character encountered while parsing value
body: <p>I am trying to save conversation data via state client and I am getting inconsistent results between the emulator and the sms channels. Testing my bot app via emulator allows me to SetConversationData and GetConversationData fine, but as soon as I try it on sms with service url: <a href="https://sms.botframework.com/" rel="nofollow noreferrer">https://sms.botframework.com/</a> I get the following error:</p>
  
  <blockquote>
    <p>"exceptionMessage": "Unable to deserialize the response.",
      "exceptionType": "Microsoft.Rest.SerializationException",
      "stackTrace": "   at Microsoft.Bot.Connector.BotState.d__9.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Bot.Connector.BotStateExtensions.d__9.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Bot.Connector.BotStateExtensions.SetConversationData(IBotState operations, String channelId, String conversationId, BotData botData)\r\n   at OutboundTestApp.Controllers.OutboundController.Post(OutboundConversationData`1 outboundData)",
      "innerException": {
        "message": "An error has occurred.",
        "exceptionMessage": "Unexpected character encountered while parsing value: T. Path '', line 0, position 0.",
        "exceptionType": "Newtonsoft.Json.JsonReaderException",
        "stackTrace": "   at Newtonsoft.Json.JsonTextReader.ParseValue()\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)\r\n   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)\r\n   at Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject[T](String json, JsonSerializerSettings settings)\r\n   at Microsoft.Bot.Connector.BotState.d__9.MoveNext()"</p>
  </blockquote>
  
  <p>Here is my code to set the data where the channelId is "sms", conversationId is a valid id and the data is just a simple POCO class: </p>
  
  <pre><code>   var stateClient = new StateClient(new Uri(serviceUrl), account);
      stateClient.BotState.SetConversationData(outboundData.ChannelId, conversationResponse.Id, new BotData(data: outboundData.Data));
  </code></pre>
  
  <p>Should I be using SetPrivateConversationDataWithHttpMessagesAsync and pass in the content type and set my botdata to a json string? I feel the state client is assuming json is being passed somewhere, but the object it is deserializing is actually not json. </p>