httphandler for a specific folder

Discussion in 'ASP .Net' started by Ned White, May 15, 2008.

  1. Ned White

    Ned White Guest

    Hi All,
    I would like to create a httphandler to set text watermark on image files
    before it gets displayed to the user.
    But this handler must listen specific folder or virtual directory(on same
    IIS) not all the image files in the web application, for example it should
    work for only "/Images/Products" folder and all its subfolders. Or
    "Products" virtual directory and all subfolders.

    Is there a way to do this ?

    Thanks in advance for suggestions.

    Ned
     
    Ned White, May 15, 2008
    #1
    1. Advertising

  2. Ned White

    Kalpesh Guest

    httpHandler section in web.config could help.
    It has a path property, which could be used to specify handler for
    specific path.

    I am just guessing it based on the docs.
    Experts can help.

    Kalpesh

    On May 15, 3:21 pm, "Ned White" <nedwhite@> wrote:
    > Hi All,
    > I would like to create a httphandler to set text watermark on image files
    > before it gets displayed to the user.
    > But this handler must listen specific folder or virtual directory(on same
    > IIS) not all the image files in the web application, for example it should
    > work for only "/Images/Products" folder and all its subfolders. Or
    > "Products" virtual directory and all subfolders.
    >
    > Is there a way to do this ?
    >
    > Thanks in advance for suggestions.
    >
    > Ned
     
    Kalpesh, May 15, 2008
    #2
    1. Advertising

  3. Ned White

    Madhur Guest

    You can have a specific web.config for each virtual folder. web.config
    inherits settings from parent web.config.

    Hope this helps.

    --
    Madhur

    "Ned White" <nedwhite@> wrote in message
    news:...
    > Hi All,
    > I would like to create a httphandler to set text watermark on image files
    > before it gets displayed to the user.
    > But this handler must listen specific folder or virtual directory(on same
    > IIS) not all the image files in the web application, for example it should
    > work for only "/Images/Products" folder and all its subfolders. Or
    > "Products" virtual directory and all subfolders.
    >
    > Is there a way to do this ?
    >
    > Thanks in advance for suggestions.
    >
    > Ned
    >
    >
     
    Madhur, May 16, 2008
    #3
  4. Problem is that images do not go through .NET thus your handler will not be
    called if browser requests /Images/Products/myimaje.jpg

    The best way is to have it in your html like
    <img src="myhandler.asmx?image=myimage.jpg">
    And handler will get the image, sign it and return to the user.



    George.


    "Ned White" <nedwhite@> wrote in message
    news:...
    > Hi All,
    > I would like to create a httphandler to set text watermark on image files
    > before it gets displayed to the user.
    > But this handler must listen specific folder or virtual directory(on same
    > IIS) not all the image files in the web application, for example it should
    > work for only "/Images/Products" folder and all its subfolders. Or
    > "Products" virtual directory and all subfolders.
    >
    > Is there a way to do this ?
    >
    > Thanks in advance for suggestions.
    >
    > Ned
    >
    >
     
    George Ter-Saakov, May 16, 2008
    #4
    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. Marcel van eijkel ( www.vaneijkel.com )

    set the httphandler to folder ,and not to file

    Marcel van eijkel ( www.vaneijkel.com ), Aug 28, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    432
  2. Replies:
    1
    Views:
    803
    Mark Rae
    Feb 26, 2006
  3. =?Utf-8?B?SmF2?=

    Is ViwState Page-Specific or UserControl-Specific

    =?Utf-8?B?SmF2?=, Aug 16, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    538
    =?Utf-8?B?SmF2?=
    Aug 16, 2006
  4. mazdotnet
    Replies:
    2
    Views:
    398
    Alexey Smirnov
    Oct 2, 2009
  5. William FERRERES
    Replies:
    7
    Views:
    217
    William FERRERES
    Jul 9, 2007
Loading...

Share This Page