HTTP Handler cannot find axd file in nested web application folder: Telerik RadScriptManager cannot find WebResource.axd in ~/admin/ folder

拈花ヽ惹草 提交于 2019-12-05 21:05:09

Turns out that ASP.NET looks at the HTTP Handlers in the root web.config first, and then looks at the HTTP Handlers in the virtual directory web.config file. So when it hit the line I marked as "Culprit" below, it never reached the line in the virtual directory web.config file. So I just added another line above the "Culprit" HTTP Handler.

Root website folder web.config HTTP Handlers:

<httpHandlers>
    <add path="/services/social.axd" verb="GET,POST" type="Acu.Cms.Modules.Social.PeopleHandler, Acu.Cms.Modules.Social"/>
    <add verb="*" path="AcuLanapCaptcha.axd" type="Lanap.BotDetect.AcuCaptchaHandler, Lanap.BotDetect"/>
    <add verb="*" path="LanapCaptcha.aspx" type="Lanap.BotDetect.CaptchaHandler, Lanap.BotDetect"/>
    <add path="*.cmsx" verb="*" type="Acu.Cms.Web.HttpCmsRequestHandler, Acu.Cms"/>
    <add path="image.acux" verb="GET" type="Acu.Web.Imaging.WebImageHandler, Acu.Web.Imaging"/>
    <add path="media.acux" verb="GET" type="Acu.Cms.Web.CmsWebMediaHandler, Acu.Cms"/>
    <remove verb="*" path="*.asmx" />
    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
    <!-- FIXED WITH THIS LINE --><add verb="*" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" validate="false" />  
    <!-- CULPRIT ............ --><add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" />  
</httpHandlers>

Also added this to the virtual directory web.config:

    <handlers>

... removed other handlers

        <add name="Telerik.Web.UI.WebResource"
             path="Telerik.Web.UI.WebResource.axd" 
             type="Telerik.Web.UI.WebResource, Telerik.Web.UI"
             verb="*"  />

    </handlers>

... the other alternative is to add "admin/*" to the beginning of the path web.config attributes. If that handler is used in the RadEditor or other control, you must reference it correctly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!