Dynamic ASPX Image Output for static ...xxx.jpg URL

Discussion in 'ASP .Net' started by Alex Maghen, Jun 17, 2010.

  1. Alex Maghen

    Alex Maghen Guest

    I have a URL static URL that's being hit all the time:
    "http://xyz.com/image.jpg". I want instead to put an ASPX file in that will
    either output a dynamic JPEG itself or at least do a redirect to the JPEG I
    want.

    How can I create a configuration that will "replace"
    "http://xyz.com/image.jpg" with an ASPX? And I want to do this somehow INSIDE
    the VS.NET Web Project and not in an IIS config because I want it to actually
    work when I debug it through the VS IDE.

    Thanks for your help.

    Alex
     
    Alex Maghen, Jun 17, 2010
    #1
    1. Advertising

  2. Alex Maghen

    behdad Guest

    On Jun 17, 11:47 am, Alex Maghen <> wrote:
    > I have a URL static URL that's being hit all the time:
    > "http://xyz.com/image.jpg". I want instead to put an ASPX file in that will
    > either output a dynamic JPEG itself or at least do a redirect to the JPEG I
    > want.
    >
    > How can I create a configuration that will "replace"
    > "http://xyz.com/image.jpg" with an ASPX? And I want to do this somehow INSIDE
    > the VS.NET Web Project and not in an IIS config because I want it to actually
    > work when I debug it through the VS IDE.
    >
    > Thanks for your help.
    >
    > Alex

    You can use HttpHandler this might help:
    http://www.hanselman.com/blog/ASPNETFuturesGeneratingDynamicImagesWithHttpHandlersGetsEasier.aspx
     
    behdad, Jun 18, 2010
    #2
    1. Advertising

  3. Alex Maghen

    3P Guest

    Dnia 17-06-2010 o 17:47:56 Alex Maghen <>
    napisa³(a):

    > I have a URL static URL that's being hit all the time:
    > "http://xyz.com/image.jpg". I want instead to put an ASPX file in that
    > will
    > either output a dynamic JPEG itself or at least do a redirect to the
    > JPEG I
    > want.
    >
    > How can I create a configuration that will "replace"
    > "http://xyz.com/image.jpg" with an ASPX? And I want to do this somehow
    > INSIDE
    > the VS.NET Web Project and not in an IIS config because I want it to
    > actually
    > work when I debug it through the VS IDE.
    >
    > Thanks for your help.
    >
    > Alex


    You can insert
    <img src="YourASPXPageReturningJpeg.aspx?parametersIfYouLike"/>
     
    3P, Jun 20, 2010
    #3
  4. Alex Maghen

    3P Guest

    Dnia 21-06-2010 o 15:25:26 Russell <> napisa³(a):

    > On Jun 17, 11:47 am, Alex Maghen <> wrote:
    >> I have a URL static URL that's being hit all the time:
    >> "http://xyz.com/image.jpg". I want instead to put an ASPX file in that
    >> will
    >> either output a dynamic JPEG itself or at least do a redirect to the
    >> JPEG I
    >> want.
    >>
    >> How can I create a configuration that will "replace"
    >> "http://xyz.com/image.jpg" with an ASPX? And I want to do this somehow
    >> INSIDE
    >> the VS.NET Web Project and not in an IIS config because I want it to
    >> actually
    >> work when I debug it through the VS IDE.
    >>
    >> Thanks for your help.
    >>
    >> Alex

    >
    > This is what ASHX handlers are for. You can map them to paths with an
    > httpHandler mapping in your web config.
    >
    > <httpHandlers>
    > <add verb="*" path="[whatever]" validate="true"
    > type="[class,assembly]"/>
    > </httpHandlers>


    Yes You are right. Ashx handlers are better because they don't have
    unnecessary page life cycle.
     
    3P, Jun 22, 2010
    #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. Åukasz Ligowski

    "xxx.has_key(a)" vs "a in xxx"

    Åukasz Ligowski, Oct 30, 2008, in forum: Python
    Replies:
    0
    Views:
    305
    Åukasz Ligowski
    Oct 30, 2008
  2. Replies:
    0
    Views:
    1,076
  3. Bert Leu

    value of type "xxx" cannot be converted to "xxx"

    Bert Leu, Jun 5, 2007, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    331
    Jesse Houwing
    Jun 6, 2007
  4. Richard Lionheart
    Replies:
    4
    Views:
    299
    Richard Lionheart
    May 5, 2004
  5. Iñaki Baz Castillo
    Replies:
    5
    Views:
    173
    Iñaki Baz Castillo
    Mar 30, 2008
Loading...

Share This Page