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
파일 보기 프로젝트 열기: unic/SitecoreErrorManager

보호된 메소드들

메소드 설명
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