C# Класс Unic.SitecoreCMS.Modules.ErrorManager.Resources.Media.MediaRequestHandler

Class implements a custom MediaRequestHandler. It redirects to the configured 404 page if a media request is invalid.

To add the handler, change the default MediaRequestHandler in web.config from: <system.webServer> <handlers> <add verb="*" path="sitecore_media.ashx" type="Sitecore.Resources.Media.MediaRequestHandler, Sitecore.Kernel" name="Sitecore.MediaRequestHandler" /> </handlers> </system.webServer> to <system.webServer> <handlers> <add verb="*" path="sitecore_media.ashx" type="Unic.SitecoreCMS.Modules.ErrorManager.Resources.Media.MediaRequestHandler, Unic.SitecoreCMS.Modules.ErrorManager" name="Sitecore.MediaRequestHandler" /> </handlers> </system.webServer> and from <system.web> <httpHandlers> <add verb="*" path="sitecore_media.ashx" type="Sitecore.Resources.Media.MediaRequestHandler, Sitecore.Kernel" /> </httpHandlers> </system.web> to <system.web> <httpHandlers> <add verb="*" path="sitecore_media.ashx" type="Unic.SitecoreCMS.Modules.ErrorManager.Resources.Media.MediaRequestHandler, Unic.SitecoreCMS.Modules.ErrorManager" /> </httpHandlers> </system.web>
Наследование: Sitecore.Resources.Media.MediaRequestHandler
Показать файл Открыть проект

Защищенные методы

Метод Описание
DoProcessRequest ( HttpContext context ) : bool

Process the current request and return false if the media item was not found, so Sitecore can go ahead with processing the pipelines. Also check the availableLanguages from the current Sitecore.Sites.SiteContext to check for a valid language version of the media.

Описание методов

DoProcessRequest() защищенный Метод

Process the current request and return false if the media item was not found, so Sitecore can go ahead with processing the pipelines. Also check the availableLanguages from the current Sitecore.Sites.SiteContext to check for a valid language version of the media.
protected DoProcessRequest ( HttpContext context ) : bool
context System.Web.HttpContext Current .
Результат bool