public ActionResult Index() { ChatModel model = new ChatModel { ServerUrl = WebAppSettings.ServerUrl.Value, ServerToken = SecurityUtilities.GenerateServerToken(HttpContext.GetOwinContext().Authentication), UserName = new MvcHtmlString(JavaScriptStringEncode(User.Identity.Name)) }; return(View(model)); }