473,396 Members | 2,038 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,396 software developers and data experts.

ASP.NET Httphandler and file names with ampersand = 404 Error. Please help.

I want to process requests to certain image files that have a custom
..icon(32x32) extenstion with a custom .NET HttpHandler in order to be able
to tap into Application events. This works fine almost everytime except that
I get a 404 error when trying to access a file with an ampersand in its
name. The error happens only if I point the aspnet_isapi.dll to the .NET
Framework 1.1. If I use the aspnet_isapi.dll of the old .NET framework
(1.0), I get no errors. Do you have any ideas?

Here is what I am doing:

1. I have a class implementing IHttpHandler interface. The ProcessRequest()
method simply writes the .icon(16x16) file to the virtual directory and the
subsequent HTTP request for the icon gets the file from the virtual
directory.

2. Web.config file contains this entry:
<httpHandlers>
<add verb="GET,HEAD,POST,DEBUG" path="*.icon(32x32)"
type="MyHandler, MyAssemblyName" />
</httpHandlers>

3. There is the mapping of the ".icon(32x32)" file extension to .NET
Framework aspnet_isapi.dll with the verbs "GET,HEAD,POST,DEBUG" in my web
application directory.

I am running IIS 5.0 and .NET Framework 1.1. As I said, using the old .NET
Framework in my ISAPI mappings
(C:\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet _isapi.dll), I have
absolutely no problems. Did MS change something? Maybe some new security
restrictions that is causing this to happen??
Thanks,
Prasanna
Nov 18 '05 #1
1 2872
The ampersand character is a URL character for separating the URL from the
QueryString. IOW, if you request, for example:

http://www.yoursite.com/foo&bar.icon

The web server will identify the ampersand as the end of the URL and the
beginning of the query string.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Prasanna Padmanabhan" <pr*******@citrix.nospam.com> wrote in message
news:e6**************@TK2MSFTNGP10.phx.gbl...
I want to process requests to certain image files that have a custom
.icon(32x32) extenstion with a custom .NET HttpHandler in order to be able
to tap into Application events. This works fine almost everytime except that I get a 404 error when trying to access a file with an ampersand in its
name. The error happens only if I point the aspnet_isapi.dll to the .NET
Framework 1.1. If I use the aspnet_isapi.dll of the old .NET framework
(1.0), I get no errors. Do you have any ideas?

Here is what I am doing:

1. I have a class implementing IHttpHandler interface. The ProcessRequest() method simply writes the .icon(16x16) file to the virtual directory and the subsequent HTTP request for the icon gets the file from the virtual
directory.

2. Web.config file contains this entry:
<httpHandlers>
<add verb="GET,HEAD,POST,DEBUG" path="*.icon(32x32)"
type="MyHandler, MyAssemblyName" />
</httpHandlers>

3. There is the mapping of the ".icon(32x32)" file extension to .NET
Framework aspnet_isapi.dll with the verbs "GET,HEAD,POST,DEBUG" in my web
application directory.

I am running IIS 5.0 and .NET Framework 1.1. As I said, using the old .NET
Framework in my ISAPI mappings
(C:\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet _isapi.dll), I have
absolutely no problems. Did MS change something? Maybe some new security
restrictions that is causing this to happen??
Thanks,
Prasanna

Nov 18 '05 #2

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...
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...
1
by: sathya | last post by:
hi, i have problem in httphandler, my problem is that when i am trying to use server.execute(/default.aspx) i am getting error.... Here i am trying to redirect from home.aspx to...
2
by: Ken Yee | last post by:
First a little background: I've written an httphandler to handle wildcard extensions (i.e., I want to handle all URLs that come in rather than just URLs w/ a specific file extension so I can give...
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...
4
by: Anbu | last post by:
Hi All, I'm implementing a soapreceiver class in a web site. The required httpHandler tag was also added in the web.config as below. <httpHandlers> <add verb="*" path="Receiver.ashx"...
0
by: Anbu | last post by:
Hi All, I'm implementing a soapreceiver class in a web site. The required httpHandler tag was also added in the web.config as below. <httpHandlers> <add verb="*" path="Receiver.ashx"...
5
by: Author | last post by:
I followed the example at http://support.microsoft.com/kb/308001/EN-US/ and created my own HttpHandler. Here is the code: using System.Web; namespace MyNameSpace { public class...
2
by: embz | last post by:
this post concerns three pages. 1. this page: http://www.katherine-designs.com/sendemail.php i get the following errors: a lot of it seems to deal with the PHP code i inserted to the page....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.