473,405 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

HttpHandler not being cleared

In the root of my ASP.NET app I've a web.config which includes these lines:
<code
[1

<httpHandlers><add verb="*" path="GetImage.ashx" type="StatsAndMaps.Map.GetImage, StatsAndMaps" /></httpHandlers></code

In a sub-folder where I don't care about this I've another web.config which includes these lines:
<code
[2

<httpHandlers><clear /></httpHandlers></code
But, when I run the app and access a page in the sub-folder [2], I'm getting a "File or assembly name StatsAndMaps, or one of its dependencies, was not found" error with the contents of [1] highlighted. I expected [1] to be ignored, so what's happening?

Any ideas, anyone?
Nov 18 '05 #1
3 1998
Hi, gingerbbm,

Firts, for the web.config in the subdirectory to be taken in consideration
the subdirectory should be configured to be an application (in the IIS).

Now, to remove the handlers in, let's say, subfolder sub1 add the following
to the web.config (the one in the root of the application):

<location path="sub1">
<system.web>
<httpHandlers>
<clear />
</httpHandlers>
</system.web>
</location>

Hope this helps
Martin
"gingerbbm" <st**********@aligned-assets.co.uk> wrote in message
news:39**********************************@microsof t.com...
In the root of my ASP.NET app I've a web.config which includes these lines: <code>
[1]

<httpHandlers><add verb="*" path="GetImage.ashx" type="StatsAndMaps.Map.GetImage, StatsAndMaps" /></httpHandlers></code>

In a sub-folder where I don't care about this I've another web.config which includes these lines: <code>
[2]

<httpHandlers><clear /></httpHandlers></code>
But, when I run the app and access a page in the sub-folder [2], I'm getting a "File or assembly name StatsAndMaps, or one of its dependencies,
was not found" error with the contents of [1] highlighted. I expected [1] to
be ignored, so what's happening?
Any ideas, anyone?

Nov 18 '05 #2
Thanks for responding, Martin.

The subfolder is defined as an app in IIS. I had tried putting the <clear/> into the web.config in the subfolder but to no avail, so I tried it the way you suggested, by packaging it up in a <location> element in the root web.config. Unfortunately that doesn't do it either.

Do the "default" settings in the root web.config have to be in a <location> element too?

I found this on Google Groups... can you verify?
http://groups.google.com/groups?hl=e...3DN%26tab%3Dwg

Any further help is greatly appreciated... it can't be this difficult!

Cheers
Stu
Nov 18 '05 #3
Hi, Stu,

I could not find a KB article to confirm what was stated in the reply in
google. But if it is true you don't have many options other than:
1. Set the handler for an application that doesn't have subroots.
2. Copy the dll to the bin folder(s) of the subroot application(s).

Another thing to try that comes to my mind is to set the validate attribute
in the <add> tag to false. But in this case I don't know what will happen if
there comes a request that should go to the handler in the subdirectory.

Greetings
Martin
"gingberbbm" <st**********@aligned-assets.co.uk> wrote in message
news:86**********************************@microsof t.com...
Thanks for responding, Martin.

The subfolder is defined as an app in IIS. I had tried putting the <clear/> into the web.config in the subfolder but to no avail, so I tried it
the way you suggested, by packaging it up in a <location> element in the
root web.config. Unfortunately that doesn't do it either.
Do the "default" settings in the root web.config have to be in a <location> element too?
I found this on Google Groups... can you verify?
http://groups.google.com/groups?hl=e...3DN%26tab%3Dwg
Any further help is greatly appreciated... it can't be this difficult!

Cheers
Stu

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hanse Davion | last post by:
Can anyone provide some insight on what this problem could be? I have searched the web, read forums, and all the installation documentation for the dotnetnuke feeware portal from asp.net. I am...
3
by: Jed | last post by:
I have written an HttpHandler which I invoke through an ashx page. The HttpHandler does various things to process the request, then it is supposed to redirect to a confirmation page. Everything...
4
by: Jeremy Lew | last post by:
When my HttpHandler is processing a request when installed on a particular 2003 Server machine, the Context.Session object is null. Any idea why this might be? My handler implements...
3
by: Ralf Müller | last post by:
hi all! in my custom HttpHandler HttpContext.Current.Session is not set - why? greetings, ralf
9
by: Jared Tullis | last post by:
We have an .NET 1.1 application running on 4 2K3 load balanced servers (using WLBS). IIS has the .NET aspnet_isapi.dll mapped as a wildcard application map. The web.config points *.html to a...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
5
by: the4man | last post by:
Hi all! I have an app that show images that are stored in SQL Server. To show the images on screen, until now (with the "old" ASP), I use the following code: <img src="showimage.asp?id=20"...
0
by: Gais | last post by:
Hi, I have written an httphandler to deal with all requests for .aspx files on a website to rewrite URLs in to a more search engine friendly format. I uploaded to changes to the site and it all...
5
by: zlf | last post by:
Hello, I try to use a custom HttpHandler to add something to session, then display the original page. public void ProcessRequest(HttpContext context) { context.Session = "test"; } But, a...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.