title: Exception using LUIS dialog
body: <p>I am using bot framework SDK (3.8.2 / 3.8.3) and getting the following error while using the LUIS dialog with the Bot Framework Emulator.</p>
  
  <p>Any idea?</p>
  
  <p><strong>Exception:</strong></p>
  
  <p>;HelpWhoIsWhoDetailsFromName [File of type 'text/plain']</p>
  
  <p>(strangely whatever my intent is, the exception has a  ';' in front )</p>
  
  <p><strong>Error details</strong></p>
  
  <pre><code>at Microsoft.Bot.Builder.Dialogs.LuisDialog.&lt;EnumerateHandlers&gt;d__0.MoveNext()
  at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
  at Microsoft.Bot.Builder.Dialogs.LuisDialog`1.GetHandlersByIntent()
  at Microsoft.Bot.Builder.Dialogs.LuisDialog`1.&lt;DispatchToIntentHandler&gt;d__9.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.Bot.Builder.Dialogs.LuisDialog`1.&lt;MessageReceived&gt;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 Microsoft.Bot.Builder.Dialogs.Internals.DialogTask.ThunkResume`1.&lt;Rest&gt;d__5.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.Bot.Builder.Internals.Fibers.Wait`2.&lt;Microsoft-Bot-Builder-Internals-Fibers-IWait&lt;C&gt;-PollAsync&gt;d__19.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.Bot.Builder.Internals.Fibers.Frame`1.&lt;Microsoft-Bot-Builder-Internals-Fibers-IFrameLoop&lt;C&gt;-PollAsync&gt;d__9.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.Bot.Builder.Internals.Fibers.Fiber`1.&lt;Microsoft-Bot-Builder-Internals-Fibers-IFiberLoop&lt;C&gt;-PollAsync&gt;d__16.MoveNext()
  ---End of stack trace from previous location where exception was thrown---
  
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
  at Microsoft.Bot.Builder.Internals.Fibers.Wait`2.Microsoft.Bot.Builder.Internals.Fibers.IAwaiter&lt;T&gt;.GetResult()
  at Microsoft.Bot.Builder.Dialogs.Chain.LoopDialog`1.&lt;ResumeAsync&gt;d__3.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.Bot.Builder.Dialogs.Internals.DialogTask.ThunkResume`1.&lt;Rest&gt;d__5.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.Bot.Builder.Internals.Fibers.Wait`2.&lt;Microsoft-Bot-Builder-Internals-Fibers-IWait&lt;C&gt;-PollAsync&gt;d__19.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.Bot.Builder.Internals.Fibers.Frame`1.&lt;Microsoft-Bot-Builder-Internals-Fibers-IFrameLoop&lt;C&gt;-PollAsync&gt;d__9.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.Bot.Builder.Internals.Fibers.Fiber`1.&lt;Microsoft-Bot-Builder-Internals-Fibers-IFiberLoop&lt;C&gt;-PollAsync&gt;d__16.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.Bot.Builder.Dialogs.Internals.DialogTask.&lt;Microsoft-Bot-Builder-Base-IEventLoop-PollAsync&gt;d__23.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.Bot.Builder.Dialogs.Internals.ReactiveDialogTask.&lt;Microsoft-Bot-Builder-Base-IEventLoop-PollAsync&gt;d__3.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.Bot.Builder.Dialogs.Internals.ScoringEventLoop`1.&lt;Microsoft-Bot-Builder-Base-IEventLoop-PollAsync&gt;d__5.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.Bot.Builder.Dialogs.Internals.EventLoopDialogTask.&lt;Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync&gt;d__3.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.Bot.Builder.Dialogs.Internals.SetAmbientThreadCulture.&lt;Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync&gt;d__3.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.Bot.Builder.Dialogs.Internals.QueueDrainingDialogTask.&lt;Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync&gt;d__4.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.Bot.Builder.Dialogs.Internals.PersistentDialogTask.&lt;Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync&gt;d__3.MoveNext()
  --- End of stack trace from previous location where exception was thrown---
  
  at Microsoft.Bot.Builder.Dialogs.Internals.PersistentDialogTask.&lt;Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync&gt;d__3.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.Bot.Builder.Dialogs.Internals.ExceptionTranslationDialogTask.&lt;Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync&gt;d__2.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.Bot.Builder.Dialogs.Internals.SerializeByConversation.&lt;Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync&gt;d__4.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.Bot.Builder.Dialogs.Internals.PostUnhandledExceptionToUser.&lt;Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync&gt;d__5.MoveNext()
  </code></pre>
  
  <p>Controller Code</p>
  
  <pre><code>[BotAuthentication]
  public class MessagesController : ApiController
  {
      /// &lt;summary&gt;
      /// POST: api/Messages
      /// Receive a message from a user and reply to it
      /// &lt;/summary&gt;
      public async Task&lt;HttpResponseMessage&gt; Post([FromBody]Activity activity)
      {
          if (activity.Type == ActivityTypes.Message)
          {
              try
              {
                 //await Conversation.SendAsync(activity, () =&gt; new Dialogs.RootDialog());
                  await Conversation.SendAsync(activity, () =&gt; new MatLuisDialog());
              }
              catch (Exception ex)
              {
                  string ss = ex.ToString();
              }
          }
          else
          {
              HandleSystemMessage(activity);
          }
          var response = Request.CreateResponse(HttpStatusCode.OK);
          return response;
      }
  
      private Activity HandleSystemMessage(Activity message)
      {
          if (message.Type == ActivityTypes.DeleteUserData)
          {
              // Implement user deletion here
              // If we handle user deletion, return a real message
          }
          else if (message.Type == ActivityTypes.ConversationUpdate)
          {
              // Handle conversation state changes, like members being added and removed
              // Use Activity.MembersAdded and Activity.MembersRemoved and Activity.Action for info
              // Not available in all channels
          }
          else if (message.Type == ActivityTypes.ContactRelationUpdate)
          {
              // Handle add/remove from contact lists
              // Activity.From + Activity.Action represent what happened
          }
          else if (message.Type == ActivityTypes.Typing)
          {
              // Handle knowing tha the user is typing
          }
          else if (message.Type == ActivityTypes.Ping)
          {
          }
  
          return null;
      }
  }
  </code></pre>
  
  <p>Luis Dialog</p>
  
  <pre><code>[Serializable]
  [LuisModel("XXXXXXX-0ab19c3225cb", "XXXXXXXX582c599915aea4")] // changed the keys 
  public class MatLuisDialog: LuisDialog&lt;string&gt;
  {
  
      [LuisIntent("HelpWhoIsWhoDetailsFromName")]
      public async Task HelpWhoIsWhoDetailsFromName(IDialogContext context, LuisRequest result)
      {
          await context.PostAsync("From");
          context.Wait(MessageReceived);
      }
  
      [LuisIntent("")]
      [LuisIntent("None")]
      public async Task None(IDialogContext context, LuisRequest result)
      {
          await context.PostAsync("No intent Found");
          context.Wait(MessageReceived);
      }
  
      [LuisIntent("Help.Greetings")]
      public async Task Greetings(IDialogContext context, LuisRequest result)
      {
          await context.PostAsync("Hi, Please enter your matone id, so that i can help you better.");
          context.Wait(MessageReceived);
      }
  
  }
  </code></pre>