WebResource.axd Error - "handler must be registered"

Last post 04-10-2008 11:30 AM by fhaglund. 11 replies.

Sort Posts:

  • WebResource.axd Error - "handler must be registered"

    09-05-2007, 12:33 PM
    • Loading...
    • ModemRat
    • Joined on 09-05-2007, 4:32 PM
    • Posts 1

     Hi everyone,

    I've been trying to figure out this error for a while, hopefully
    someone has had a similar experience and has some insight.  I recent
    migrated an ASP.NET app to 2.0.  On pages that contain validation
    controls, I get the following error:

    "The WebResource.axd handler must be registered in the configuration
    to process this request.

    <!-- Web.Config Configuration File -->

    <configuration>
        <system.web>
            <httpHandlers>
                <add path="WebResource.axd" verb="GET"
    type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
            </httpHandlers>
        </system.web>
    </configuration>"

    I have tried to "register" WebResource.axd in the config as show in
    the above example but it hasn't solved the problem.  The
    WebResource.axd is a virtual file that serves out resources held in
    assemblies, so it is necessary to create a mapping aspnet_isapi.exe
    for the axd extension, which I did and have confirmed many times.  I
    do not have any security or authentication plugins installed on my IIS
    server that may intercept the request for an axd file and not know
    what to do with it.  Any ideas on how to solve this, or troubleshoot
    further?

    Thanks

    Bill

  • Re: WebResource.axd Error - "handler must be registered"

    09-29-2007, 7:20 AM
    • Loading...
    • fhaglund
    • Joined on 09-29-2007, 7:17 AM
    • Stockholm, Sweden
    • Posts 4

    Hi!

    I had a similar problem with one of my customers sites. You can read my analysis and find a possible workaround in my blog.

    /Fredrik

  • Re: WebResource.axd Error - "handler must be registered"

    01-15-2008, 4:30 PM
    • Loading...
    • mmleinen
    • Joined on 04-05-2004, 10:10 AM
    • Posts 11
    Fredrik, I am also having this problem, but I don't think your work around applies to the scenario I am having. I have installed VS 2008 Professional on two machines running Vista Business. Both of them have the same problem after a default installation. After creating a new website and adding a simple control, such as the login control, I get all of this below. This does not happen to me if I install the same vs 2008 on Windows server 2003 or on Windows XP. Any thoughts about how to resolve this? I have looked long and hard and have found nothing. Thanks, Randy Leinen +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "The WebResource.axd handler must be registered in the configuration to process this request. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: The WebResource.axd handler must be registered in the configuration to process this request. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidOperationException: The WebResource.axd handler must be registered in the configuration to process this request. ] System.Web.Handlers.AssemblyResourceLoader.GetWebResourceUrlInternal(Assembly assembly, String resourceName, Boolean htmlEncoded) +743 System.Web.Handlers.AssemblyResourceLoader.GetWebResourceUrl(Type type, String resourceName, Boolean htmlEncoded) +897 System.Web.UI.ClientScriptManager.GetWebResourceUrl(Page owner, Type type, String resourceName, Boolean htmlEncoded) +155 System.Web.UI.WebControls.BaseValidator.RegisterValidatorCommonScript() +252 System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +71 System.Web.UI.Control.PreRenderRecursiveInternal() +110 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Control.PreRenderRecursiveInternal() +193 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6490"
  • Re: WebResource.axd Error - "handler must be registered"

    01-16-2008, 8:06 AM
    • Loading...
    • ajk-eis
    • Joined on 08-08-2003, 4:00 PM
    • Posts 27

    Hi Bill, hi Fredrik,

    I am having the same problem migrating a 2.0 App to IIS 7.0.

    It is definately the validation controls causing the issue. I made a simple test page (on XP / IIS 6.0) and deployed that to IIS 7.0. As long as there is no validator all is well. As soon as I add a validator then the error occurs and the site will not load.

    Attempts to add the suggested httpHandler do not work with a 500.23 Error, indicating that the configuration should be migrated (using appCmd.exe for example). However this does not work either. I then receive a 500.19 error which complains about no name attribute in the tag or the "invalid" validate="True" contained in the tag.

     All other suggestions I could find have been tried (allowing override etc.). Nothing works except to run the application in classic mode.

    As soon as the App Pool is set to classic, all is fine.

    This is a real Catch 22 for the last one and a half days.

     Be glad for suggestions.

    Alle

  • Re: WebResource.axd Error - "handler must be registered"

    01-16-2008, 9:12 AM
    • Loading...
    • mmleinen
    • Joined on 04-05-2004, 10:10 AM
    • Posts 11
    Alle, Can you tell me what the ramifications / limitations are in setting the App Pool to classic? Thanks, Randy
  • Re: WebResource.axd Error - "handler must be registered"

    01-16-2008, 9:34 AM
    • Loading...
    • ajk-eis
    • Joined on 08-08-2003, 4:00 PM
    • Posts 27

    Hi Randy,

    I'm not the expert in IIS 7 (yet), but as I understand it running in Classic .NET Mode is basically the same running the App in IIS 6. Which of course means you are not able to use the advantages of IIS 7.

    Classic Mode is just a compatibility mode.

    The trouble is no matter what I do, even with Visual Studio 2008, adding an ASP 2.0 Validation Control (there are no others other than ASP 2.0) breaks the Application for IIS 7.

    Why bother with VS2008 and IIS 7 when I have to run in compatibility mode anyway?

    I'm sure there is another explanation / solution for this. BTW this is a Web Application, not a Web Site model.

    Alle

  • Re: WebResource.axd Error - "handler must be registered"

    01-16-2008, 10:42 AM
    • Loading...
    • mmleinen
    • Joined on 04-05-2004, 10:10 AM
    • Posts 11

    Alle,

    I did what you said and it worked. But it is a little unsettling to think that with IIS7 and VS 2008 being out for a fair amount of time that this problem is not even being discussed. I have searched all over and no one seems to be talking about it. Is VS 2008, ASP.NET 3.5 and IIS7 that untested? As you have stated, this problem can be reproduced easily and in fact stopped my development on my vista machine in its tracks.

     But at least there is the compatibility mode, which I thank you for! Although I am considering downgrading my dev box to XP, where there were no issues with VS 2008.

    Thanks again, and let me know if you find anything else on this matter.

    Randy

  • Re: WebResource.axd Error - "handler must be registered"

    01-16-2008, 3:29 PM
    • Loading...
    • ajk-eis
    • Joined on 08-08-2003, 4:00 PM
    • Posts 27

    The problem here is definately NOT SOLVED. We must be missing something.

    My workaround is just a hack to get the site up and running. Of course it doesn't run any worse than it did on IIS 6, but that means any future use of the validation controls (in a 3,5 site) doesn't work either (I tried that too, it really doesn't!).

    There must be a way to to run Integrated Mode with validation controls.

    Or can someone tell me how I can modify the standard validation controls so they will work in integrated mode (without giving up the client side validation)?

    AJAX is not an option since the site has to be highly accessible with blind readers, etc..

    Be glad for help.

    Alle

  • Re: WebResource.axd Error - "handler must be registered"

    01-16-2008, 3:54 PM
    • Loading...
    • ajk-eis
    • Joined on 08-08-2003, 4:00 PM
    • Posts 27

    Hi Randy,

    got someone from the IIS Core group working with me at

    http://forums.iis.net/p/1147595/1861983.aspx#1861983

    You may want to watch that thread and add your experiences. Sign in is as is here.

    Alle

  • Re: WebResource.axd Error - "handler must be registered"

    01-19-2008, 5:21 AM
    • Loading...
    • ajk-eis
    • Joined on 08-08-2003, 4:00 PM
    • Posts 27

    So thank to the folks at MS we have an answer to this (at least in two of the cases above) -

    Randy and I both had Cold Fusion 8 installed on the IIS 7 boxes.

    UPDATE - See my next post.

    The culprit is -

     <add name="AboMapperCustom-3325812" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\ColdFusion8\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll" requireAccess="None" responseBufferLimit="0" />

    in the applicationHost.config.

    The trouble is **UPDATE**  ASPNET client side scripts can not run with this mapping in itegrated mode.

    Thomas (MS) and I have listed several work arounds on the thread at http://forums.iis.net/p/1147595/1862172.aspx#1862172

    By the way, in all cases running the AppPool in compatible mode will at least let you run the site OK.

    HTH
    Alle

  • Re: WebResource.axd Error - "handler must be registered"

    01-20-2008, 11:35 AM
    • Loading...
    • ajk-eis
    • Joined on 08-08-2003, 4:00 PM
    • Posts 27

    UPDATE -

    MS has contacted me, and indicates that they feel this is in fact an error in ASPNET  (and not Cold Fusion). Wildcard mappings are allowed and CF correctly redirects as it should. My apologies to Adobe.

    MS will be working on a hotfix for this problem. When it is available I will also let you know here.

    Cheers
    Alle

  • Re: WebResource.axd Error - "handler must be registered"

    04-10-2008, 11:30 AM
    • Loading...
    • fhaglund
    • Joined on 09-29-2007, 7:17 AM
    • Stockholm, Sweden
    • Posts 4

    Update: Scott Guthrie help me to get in contact with Steve Molloy and Matt Gibbs at Microsoft about the original issue in this post (Read more about The WebResource.axd handler must be registered in the configuration to process this request - not related to Vista or Cold Fusion).

    Steve has been running this in the stress lab for a couple days. After several hundered machine-hours of stress while touching config every 3 minutes they have not been able to reproduce the issue.

    This is probably a race condition that occurs because the framwork or application we have does something special. But I have not been able to create a simple reproducable test case. Has anyone?

    I have identified several things that increases the probability to get this issue:
    * You have login controls or other controls that uses validation on your start page. (Validation needs javascript and EnsureHandlerExistenceChecked will called because Webresource.axd is used)
    * You have a lot of assembles in your bin folder.

    In my case, the framwork I use (EPiServer), has code that loads all assemblies in the bin folder in the constructor of the global.asax class. It does this because it looks for classes with plug-in attibute. This in combination with the call to EnsureHandlerExistenceChecked on the start page does probably increase the risk for the problem.

    /Fredrik

    Read more comments about "The WebResource.axd handler must be registered in the configuration to process this request" in my blog.

Page 1 of 1 (12 items)
Microsoft Communities
Page view counter