Setup And Getting Started Forum

Error for the first time run CMS
RE: Error for the first time run CMS

 
OK, so the URLAuthority is set correctly. Let's try this, go to  C:\Users\xxx\Desktop\MvcCms\MvcCms.Core\Cache\CacheService.cs and replace the code inside the first else satement in GetCurrentPortal() with the code below. Basically comment out the try catch so we can find out what error is happening first.
 
                //try
                //{
                    string url = HttpContext.Current.Request.Url.Authority.ToLower();
                    IEnumerable<Portal> portals = _inmemorycacheService.Get(PortalsHolder, () => _portalRepository.ListPortals());
                    return portals.Where(portal => portal.URLAuthority.Equals(url)).FirstOrDefault();
                //}
                //catch
                //{
                //    IEntitiesProvider entityprovider = new EntitiesProvider();
                //    entityprovider.ReopenConnection();

                //    var context = entityprovider.GetEntityContext();
                //    using (context)
                //    {
                //        string url = HttpContext.Current.Request.Url.Authority.ToLower();
                //        IEnumerable<Portal> portals = _inmemorycacheService.Get(PortalsHolder, () => _portalRepository.ListPortals());
                //        return portals.Where(portal => portal.URLAuthority.Equals(url)).FirstOrDefault();
                //    }
                //}
2 years 2 months 19 days ago by jon

Replies