IHttpHandler Path

Discussion in 'ASP .Net' started by =?Utf-8?B?amFjbw==?=, Aug 18, 2005.

  1. 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
     
    =?Utf-8?B?amFjbw==?=, Aug 18, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?amFjbw==?=

    Brock Allen Guest

    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
     
    Brock Allen, Aug 21, 2005
    #2
    1. Advertising

  3. 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

    --
     
    Dirc Khan-Evans, Oct 17, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lapin
    Replies:
    0
    Views:
    756
    lapin
    Nov 18, 2003
  2. lapin
    Replies:
    1
    Views:
    2,278
    Teemu Keiski
    Nov 19, 2003
  3. Jean CADEAU
    Replies:
    1
    Views:
    397
    Alvin Bruney
    Nov 30, 2003
  4. Chris Hughes

    IHttpHandler - configuring IIS security

    Chris Hughes, Dec 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    348
    Chris Hughes
    Dec 12, 2003
  5. Qbert

    IHttpHandler Path

    Qbert, Jun 15, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    390
    Brock Allen
    Jun 15, 2005
Loading...

Share This Page