public async Task <IActionResult> Dialogue() { var username = HttpContext.Session.GetString("LoggedUserName"); var serviceUrl = _myConfig; (List <Message> chat, bool serviceIsRunning) = await ServiceConnector.GetChatHistory(username, _myConfig.Value.ServiceUrl); if (serviceIsRunning) { return(View("Dialogue", new ChatPageViewModel() { UserName = username, ChatHistory = chat })); } return(Content("Please, turn on your Dialogue Web Service")); }