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

IHttpHandler Path

I'm attempting to create my first HttpHandler but there seems to be a problem.

The handler works fine for the root directory and all sub directories.

That is.
http://localhost/handlerexample/
and
http://localhost/handlerexample/testdir

Works fine even if the directory does not exist.

My problem is with:
http://localhost/handlerexample

Note the / at the end is missing.

When I enter this path the application tries to do directory browsing.
and since this is not allocated in IIS for the Virtual a Security Exception
is raised.

How can I fix this problem?

Thanks
Jaco Roux
Nov 19 '05 #1
2 1432
This is an aspect of IIS and you can't really get it work work unless you
write an ISAPI filter, which isn't a lot of fun.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I'm attempting to create my first HttpHandler but there seems to be a
problem.

The handler works fine for the root directory and all sub directories.

That is.
http://localhost/handlerexample/
and
http://localhost/handlerexample/testdir
Works fine even if the directory does not exist.

My problem is with:
http://localhost/handlerexample
Note the / at the end is missing.

When I enter this path the application tries to do directory browsing.
and since this is not allocated in IIS for the Virtual a Security
Exception
is raised.
How can I fix this problem?

Thanks
Jaco Roux


Nov 19 '05 #2
jaco wrote:
I'm attempting to create my first HttpHandler but there seems to be a
problem.

The handler works fine for the root directory and all sub directories.

That is.
http://localhost/handlerexample/
and
http://localhost/handlerexample/testdir

Works fine even if the directory does not exist.

My problem is with:
http://localhost/handlerexample

Note the / at the end is missing.

When I enter this path the application tries to do directory browsing.
and since this is not allocated in IIS for the Virtual a Security
Exception is raised.

How can I fix this problem?

Thanks
Jaco Roux


Do you have a default document set and does it exist? I think (guess
would be more accurate..) the HttpHandler pipeline will only work with
a document.. either requested explicitly by the client or via the
serving of a default document. If there is no document to serve, then
standard http protocol would be used.. ie there is no default document
and you cannot browse.

Dirc

--

Nov 19 '05 #3

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

Similar topics

1
by: lapin | last post by:
I'm trying to get access to session variables from an IHttpHandler class. In several places I've seen the solution posted as in this message: >If you define your own custom HttpHandler, you...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
5
by: vimakefile | last post by:
I'd like to have the concept of a Page (different code-behind file for each url, session state, etc.) but be able to specify my own custom HTTP payload. (I don't want to use any Asp.Net forms,...
1
by: Qbert | last post by:
I have a application that is using an IHttpHandler but i'm having issues with the path that I put into web.config. I want to be able to execute this handler in any subdirectory of the...
2
by: bryan | last post by:
I can't find much info on what makes an instance of the handler reusable. If it maintains no internal state, I would assume that it is safe to be reusable - correct? I have one that grabs a value...
24
by: John Rivers | last post by:
ASPX which means ASPX pages, the code-behind concept, User Controls, Web Controls etc. is very poorly designed and makes it extremely hard to develop professional quality web applications. ASPX...
1
by: Daniel | last post by:
How to access a network file path \\foo\bar.txt from an .aspx and from a custom IHttpHandler? How to specify which account that aspx application should use when doing file IO from network paths?...
1
by: David Thielen | last post by:
Hi; I just wrote my first IHttpHandler and am having a problem. If the content type is "text/html" then the below code works fine. But if it's "text/plain" then my browser gets: The XML page...
1
by: Aartware | last post by:
I've read all the items about the IHttpHandler and the session-object and I see nothing wrong with my code, but still I have no session object. This is my code: Imports System Imports...
1
by: IfThenElse | last post by:
Hello, When I add Form Authentication to my Website my IhttpHandler code is blocked. How can I tell Form Authentication to allow my IHTTPHandler code to execute, it is not secure I used to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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.