Пример #1
0
        public ActionResult Generate()
        {
            try
            {
                //var ctx = System.Web.HttpContext.Current;
                //var t = Task.Factory.StartNew<bool>(() =>
                //
                //System.Web.HttpContext.Current = ctx;
                _rssFeedService.GeneratRssFeedFiles();
                _rssFeedService.SaveUpdateTime(DateTime.Now);
                //    return true;
                //});
                //t.Wait();
                return(Content("Files have been generated successfully."));
            }
            catch (Exception ex)
            {
                _logger.Error("RssFeed: error occured in generating XML files", ex);

                return(Content(ex.Message));
            }
        }