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.
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?
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"
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.
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.
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.
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..
ModemRat
0 Points
1 Post
WebResource.axd Error - "handler must be registered"
Sep 05, 2007 04:33 PM|LINK
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
WebResource.axd error handler
fhaglund
Member
10 Points
6 Posts
Re: WebResource.axd Error - "handler must be registered"
Sep 29, 2007 11:20 AM|LINK
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
WebResource.axd error handler
mmleinen
Member
45 Points
11 Posts
Re: WebResource.axd Error - "handler must be registered"
Jan 15, 2008 08:30 PM|LINK
ajk-eis
Member
127 Points
34 Posts
Re: WebResource.axd Error - "handler must be registered"
Jan 16, 2008 12:06 PM|LINK
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
mmleinen
Member
45 Points
11 Posts
Re: WebResource.axd Error - "handler must be registered"
Jan 16, 2008 01:12 PM|LINK
ajk-eis
Member
127 Points
34 Posts
Re: WebResource.axd Error - "handler must be registered"
Jan 16, 2008 01:34 PM|LINK
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
mmleinen
Member
45 Points
11 Posts
Re: WebResource.axd Error - "handler must be registered"
Jan 16, 2008 02:42 PM|LINK
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
ajk-eis
Member
127 Points
34 Posts
Re: WebResource.axd Error - "handler must be registered"
Jan 16, 2008 07:29 PM|LINK
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
validation Controls WebResource.axd
ajk-eis
Member
127 Points
34 Posts
Re: WebResource.axd Error - "handler must be registered"
Jan 16, 2008 07:54 PM|LINK
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
ajk-eis
Member
127 Points
34 Posts
Re: WebResource.axd Error - "handler must be registered"
Jan 19, 2008 09:21 AM|LINK
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
Cold Fusion and ASPNET on IIS 7