Let's use the following code to update your Post method:
public async Task<HttpResponseMessage> Post([FromBody]Activity activity) { if (activity.Type == ActivityTypes.Message) { ConnectorClient connector = new ConnectorClient(new Uri(activity.ServiceUrl)); StateClient stateClient = activity.GetStateClient(); Query Result = new Query(); try { if (activity.Text != null) { string strContextId = ""; BotData userData = await stateClient.BotState.GetUserDataAsync (activity.ChannelId, activity.From.Id); if (userData.GetProperty<string> ("contextId")!=null) { // If we have a ContextId saved in TempData // retrieve it strContextId = userData.GetProperty<string> ("contextId").ToString(); } LUIS objLUISResult ...