Hot answers tagged


Instantiating Session object in the constructor of ES doesn't work from version 8 and beyond. We had this issue when we did the upgrade from 2013 to 8.5. So what we did is moved it to all event subscriptions methods. Please use it like that and forget about using Core Service in event system because it is an abomination, a Frankenstein which shouldn't exist ...


Instead of trying to do it in the constructor, I suggest using a Lazy<T> property to ensure that this configuration is only loaded once.


Since, you are using DXA, I will say the approach of generating the sitemap might not makes sense (unless there are other fine prints which we are not aware about). The correct approach could be similar to the one mentioned here: Generate Sitemap XML File using default functions of DXA 1.5/1.7 in Web 8/8.5


Final I got solution MimeType based on file extension and code below. > // @ExternalUrlTridionFields - Tridion ExternalUrl Field Name // > Engine engine string FileExtension = string.Empty; string mimeType = > string.Empty; if (Path.HasExtension(@ExternalUrlTridionFields)) // > Checking URL Extension { > FileExtension = Path....

Only top voted, non community-wiki answers of a minimum length are eligible