title: Microsoft Bot Framework: Exception: The data is changed
body: <p>I have a bot with the following conversation scenario:</p>
  
  <ol>
  <li>Send text to LUIS</li>
  <li>LUIS intent calls <code>context.Call(...)</code> to launch a Dialog</li>
  <li><p>This dialog terminates, save some info in the userData: </p>
  
  <p><code>private static async Task storeBotData(IDialogContext context, BotData userData)
  {
      Activity activity = (Activity)context.Activity;
      StateClient sc = activity.GetStateClient();
      await sc.BotState.SetUserDataAsync(activity.ChannelId, activity.From.Id, userData);
  }</code></p>
  
  <p>And after it call another dialog, again with <code>context.Call(...)</code>.</p></li>
  <li><p>Then the last dialog runs and terminates.</p></li>
  </ol>
  
  <p>My problem is that when updating the user data at the end of the first dialog (step 3), I have the following exception in the Bot Framework Channel Emulator: </p>
  
  <pre><code>         `Exception: The data is changed [File of type 'text/plain']`...
  </code></pre>
  
  <p>What happens here ? I think that when a dialog terminates, it call <code>setUserData</code> by itself, but I don't understand why I can't update userData anywhere in the code...</p>
  
  <p>I have tried to catch the exception, but nothing is catched.. But I know that the userData is updated, because when I try to retrieve it back, it is updated...</p>
  
  <p>Any help is welcome :)</p>
  
  <p>Thanks</p>