public Response <Contents> InsertContents([FromBody] Contents content) { try { var osPrincipal = (UserIdentity)System.Web.HttpContext.Current.User; var userData = JsonConvert.DeserializeObject <UserViewModel>(osPrincipal.UserData); content.CreatedBy = userData.CodeUserName; return(_contentBusiness.InsertContents(content)); } catch (Exception e) { _logger.Error($"InsertContents Failed: {e.Message}\n {e.StackTrace}"); return(new Response <Contents>(false, e.Message, null)); } }