.NET 2.0 WebResource.axd Error - "handler must be registered"

171 views
Skip to first unread message

Bill

unread,
Aug 31, 2007, 4:01:16 PM8/31/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
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

Bill

unread,
Sep 5, 2007, 12:02:03 PM9/5/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting

Jamie Fraser

unread,
Sep 6, 2007, 5:29:18 AM9/6/07
to DotNetDe...@googlegroups.com
Couple of things

Have you tried;

1) aspnet_regiis -i from a visual studio command prompt

2) Ensure that you don't have any .NET 1.1 apps running in the same
App Pool under IIS

Bill

unread,
Sep 6, 2007, 5:05:18 PM9/6/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Jamie,

1) I ran "aspnet_regiis -s <path>" on the specific virtual directory.
This updates all the scriptmaps, but this did not solve the problem.
I did not want to run the "-i" option since the server I use has many
apps and I did not want to potentially cause problems with anything
else.

2) There is only one app in the App Pool.

So, no luck, but thanks for your reply. Any other ideas?

Bill

On Sep 6, 2:29 am, "Jamie Fraser" <jamie.fra...@gmail.com> wrote:
> Couple of things
>
> Have you tried;
>
> 1) aspnet_regiis -i from a visual studio command prompt
>
> 2) Ensure that you don't have any .NET 1.1 apps running in the same
> App Pool under IIS
>

Alexander Higgins

unread,
Sep 6, 2007, 11:30:35 PM9/6/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting

Is the aspnet_isapi.exe the correct file for asp.net 2.0. I thought
it was a dll not and exe, but maybe I am wrong, but is the IIS mapping
event necessary? Try looking through this article to see if you can
see what is wrong in your application:

http://aspnet.4guysfromrolla.com/articles/080906-1.aspx

Alexander Higgins
http://directory.kr3at.com

> > > Bill- Hide quoted text -
>
> - Show quoted text -

Bill

unread,
Sep 7, 2007, 11:56:39 AM9/7/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
You are right, it is aspnet_isapi.dll, not an exe. Just a typo on my
part. Mapping the AXD extension is necessary because otherwise IIS
won't know what to do with a request with that extension. I've read
that article you specified. It explains how to use store and request
embedded resources, while related to my problem, doesn't really apply
to it directly. I do not have any embedded resources of my own that
is causing this problem. I am using validation controls which I know
uses the WebResource.axd to request javascript to perform the client-
side validation. Had I not used these controls, this wouldn't be an
issue. So ideally, when plopping the controls onto the page all the
WebResource.axd use should be taken care of automatically, but
something is not right that is giving me this issue.

On Sep 6, 8:30 pm, Alexander Higgins <alexhiggins...@hotmail.com>
wrote:


> Is the aspnet_isapi.exe the correct file for asp.net 2.0. I thought
> it was a dll not and exe, but maybe I am wrong, but is the IIS mapping
> event necessary? Try looking through this article to see if you can
> see what is wrong in your application:
>
> http://aspnet.4guysfromrolla.com/articles/080906-1.aspx
>

> Alexander Higginshttp://directory.kr3at.com

Alexander Higgins

unread,
Sep 8, 2007, 3:29:28 PM9/8/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Ok,

By default you shouldn't have to do anything with the mapping, as the
asp.net 2.0 install should automatically update the IIS mapping.
Perhaps something went wrong, as you stated there was not mapping for
the axd.

First does the resource work when you run the application in debug
mode (IE, calling the code using vsWebserver.exe as opposed to IIS)?

If so then you can do one of two things to fix the IIS problem. 1)
reinstall the asp.net 2.0 framework or 2) verfiy your IIS mappings are
correct. They should be as follows (with defuault ASP.NET
Installation):

Extenstion .AXD
Executable: C:\WINDOWS\Microsoft.NET\Framework
\v2.0.50727\aspnet_isapi.dll
Verbs(Limit to): GET,HEAD,POST,DEBUG
Script Engined: [Checked]
Check that File Exists: [Unchecked]


If your mappings are correct and you are still having the error then
reinstall the .net framework.

You may just want to reinstall the .Net Framework because the error
you posted ("The WebResource.axd handler must be registered in the
configuration to process this request.) is one that you should not be
seeing if the framework installed properly. Why? Becuase the entry
indicated should have been added to the C:\WINDOWS\Microsoft.NET
\Framework\v2.0.50727\CONFIG\web.config file by default. This means
unless you manually override these entries, they should be the default
for all of you applications.

<httpHandlers>
<add path="trace.axd" verb="*"
type="System.Web.Handlers.TraceHandler" validate="True" />


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

<add path="*.axd" verb="*" type="System.Web.HttpNotFoundHandler"
validate="True" />
<add path="*.aspx" verb="*"
type="System.Web.UI.PageHandlerFactory" validate="True" />
<add path="*.ashx" verb="*"
type="System.Web.UI.SimpleHandlerFactory" validate="True" />
<add path="*.asmx" verb="*"
type="System.Web.Services.Protocols.WebServiceHandlerFactory,
System.Web.Services, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" validate="False" />
<add path="*.rem" verb="*"
type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory,
System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
validate="False" />
<add path="*.soap" verb="*"
type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory,
System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
validate="False" />
<add path="*.asax" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.ascx" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.master" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.skin" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.browser" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.sitemap" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.dll.config" verb="GET,HEAD"
type="System.Web.StaticFileHandler" validate="True" />
<add path="*.exe.config" verb="GET,HEAD"
type="System.Web.StaticFileHandler" validate="True" />
<add path="*.config" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.cs" verb="*" type="System.Web.HttpForbiddenHandler"
validate="True" />
<add path="*.csproj" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.vb" verb="*" type="System.Web.HttpForbiddenHandler"
validate="True" />
<add path="*.vbproj" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.webinfo" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.licx" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.resx" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.resources" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.mdb" verb="*" type="System.Web.HttpForbiddenHandler"
validate="True" />
<add path="*.vjsproj" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.java" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.jsl" verb="*" type="System.Web.HttpForbiddenHandler"
validate="True" />
<add path="*.ldb" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.dsdgm" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.ssdgm" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.lsad" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.ssmap" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.cd" verb="*" type="System.Web.HttpForbiddenHandler"
validate="True" />
<add path="*.dsprototype" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.lsaprototype" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.sdm" verb="*" type="System.Web.HttpForbiddenHandler"
validate="True" />
<add path="*.sdmDocument" verb="*"
type="System.Web.HttpForbiddenHandler" validate="True" />
<add path="*.mdf" verb="*" type="System.Web.HttpForbiddenHandler"
validate="True" />
<add path="*.ldf" verb="*" type="System.Web.HttpForbiddenHandler"
validate="True" />
<add path="*" verb="GET,HEAD,POST"
type="System.Web.DefaultHttpHandler" validate="True" />
<add path="*" verb="*"
type="System.Web.HttpMethodNotAllowedHandler" validate="True" />
</httpHandlers>

Hope this helps.

> > > - Show quoted text -- Hide quoted text -

Jamie Fraser

unread,
Sep 9, 2007, 3:52:38 AM9/9/07
to DotNetDe...@googlegroups.com
You shouldn't, in my experience, manually adjust mappings. The
aspnet_regiis command (with the -i switch) does this for you. I can't
suggest anything other than running that to fix any incorrect mappings
which have been added....

fhaglund

unread,
Sep 29, 2007, 7:49:30 AM9/29/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi!

I have seen this error at some of my customers sites. WebResource.axd
is correctly registered in machine.config (adding it to web.config
again will not help). It appears randomly at first sight but the you
notice that it happends when the ASP.NET worker process is restarted
or the AppDomain is unloaded.

You can read more about the possibe workaround i found in my blog:
http://blog.fredrikhaglund.se/2007/09/27/the-mysterious-problem-with-webresourceaxd/

/Fredrik

Reply all
Reply to author
Forward
0 new messages