This Image Generating thing...

Discussion in 'ASP .Net' started by Lars Netzel, Jan 6, 2005.

  1. Lars Netzel

    Lars Netzel Guest

    Hey!

    I wrote a message yersterday and got some good answers and have now managed
    to generate a nice image. The problem is that it's all generated in an
    Images.Aspx file and I don't really want that. I am writing a WebControl
    Library and I want to generate everything from there...

    In the Render Sub of the Control I output some HTML and there I need to
    reference to a file in the <img> element, is there anyway to NOT have to
    point to a aspx file (that generated the picture) there and instead point to
    a more local way that I can include in my WebControl Library?

    I guess it's possible to render the image as a file and put on the
    serverdisk and then point to it but that would be a security risk I guess
    and can't really asume, that people that would use this control, like to set
    permissions on the server to make it work.

    How do I do this?

    best regards/
    Lars Netzel
     
    Lars Netzel, Jan 6, 2005
    #1
    1. Advertising

  2. Lars Netzel

    Steve Lutz Guest

    If I am correct, you want to create a WebControl that creates an image AND
    includes the <img=>... tags when rendered, correct?

    You COULD put the binary image inline, but I would not recomend that.

    From a browser's point of view an img tag creates another request to the
    server to grab the image. So you would need 2 controls/pages:
    1) The image creation page, which it looks like you aready have
    (images.aspx)
    2) The web control which renders the <img> tag.

    The webcontrol will render something like "<img
    src="/images.aspx?parameters" height=x width=x/>"
    When the browser then gets this HTML, it will call up /images.aspx to grab
    the actual image.

    That's the most straight forward way of doing it that I can think of off
    hand.

    Steve



    "Lars Netzel" <> wrote in message
    news:...
    > Hey!
    >
    > I wrote a message yersterday and got some good answers and have now

    managed
    > to generate a nice image. The problem is that it's all generated in an
    > Images.Aspx file and I don't really want that. I am writing a WebControl
    > Library and I want to generate everything from there...
    >
    > In the Render Sub of the Control I output some HTML and there I need to
    > reference to a file in the <img> element, is there anyway to NOT have to
    > point to a aspx file (that generated the picture) there and instead point

    to
    > a more local way that I can include in my WebControl Library?
    >
    > I guess it's possible to render the image as a file and put on the
    > serverdisk and then point to it but that would be a security risk I guess
    > and can't really asume, that people that would use this control, like to

    set
    > permissions on the server to make it work.
    >
    > How do I do this?
    >
    > best regards/
    > Lars Netzel
    >
    >
     
    Steve Lutz, Jan 6, 2005
    #2
    1. Advertising

  3. Lars Netzel

    Lars Netzel Guest

    Okay! Thanx, I was afraid of that that was the only way. The thign is I've
    seen really cool Chart Controls for the web that renders 3d illustrations
    using GDI+ and since they cost a lot I asume they have protected the code
    for the image rendering and if it is like you say.. that you can only render
    the image from an aspx file.. the code is pretty much open to all... and
    also a bit harder to distribute, the user will need to add the aspx file to
    his projects.. I wanted to see if it's possible to make a ONE dll solution
    for the solution that would incluse all the pictures and just work.

    What's your thoughts on this?

    /Lars



    "Steve Lutz" <> skrev i meddelandet
    news:uq6Spt%...
    > If I am correct, you want to create a WebControl that creates an image AND
    > includes the <img=>... tags when rendered, correct?
    >
    > You COULD put the binary image inline, but I would not recomend that.
    >
    > From a browser's point of view an img tag creates another request to the
    > server to grab the image. So you would need 2 controls/pages:
    > 1) The image creation page, which it looks like you aready have
    > (images.aspx)
    > 2) The web control which renders the <img> tag.
    >
    > The webcontrol will render something like "<img
    > src="/images.aspx?parameters" height=x width=x/>"
    > When the browser then gets this HTML, it will call up /images.aspx to grab
    > the actual image.
    >
    > That's the most straight forward way of doing it that I can think of off
    > hand.
    >
    > Steve
    >
    >
    >
    > "Lars Netzel" <> wrote in message
    > news:...
    >> Hey!
    >>
    >> I wrote a message yersterday and got some good answers and have now

    > managed
    >> to generate a nice image. The problem is that it's all generated in an
    >> Images.Aspx file and I don't really want that. I am writing a WebControl
    >> Library and I want to generate everything from there...
    >>
    >> In the Render Sub of the Control I output some HTML and there I need to
    >> reference to a file in the <img> element, is there anyway to NOT have to
    >> point to a aspx file (that generated the picture) there and instead point

    > to
    >> a more local way that I can include in my WebControl Library?
    >>
    >> I guess it's possible to render the image as a file and put on the
    >> serverdisk and then point to it but that would be a security risk I guess
    >> and can't really asume, that people that would use this control, like to

    > set
    >> permissions on the server to make it work.
    >>
    >> How do I do this?
    >>
    >> best regards/
    >> Lars Netzel
    >>
    >>

    >
    >
     
    Lars Netzel, Jan 6, 2005
    #3
  4. Hi Lars,

    First, if your ASP.Net code is pretty much open to all, you have a SERIOUS
    security hole on your web server!

    Second, you must understand that in a web page, an image is requested via a
    URL. Now, you could always write a custom HTTP handler that handles the
    image request, but you will still have to have a URL that the HTTP handler
    can respond to. It is actually much simpler (and just as secure) to do it
    the easy way, and write an ASPX page that serves up the image.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Neither a follower nor a lender be.

    "Lars Netzel" <> wrote in message
    news:O67b7c$...
    > Okay! Thanx, I was afraid of that that was the only way. The thign is I've
    > seen really cool Chart Controls for the web that renders 3d illustrations
    > using GDI+ and since they cost a lot I asume they have protected the code
    > for the image rendering and if it is like you say.. that you can only
    > render the image from an aspx file.. the code is pretty much open to
    > all... and also a bit harder to distribute, the user will need to add the
    > aspx file to his projects.. I wanted to see if it's possible to make a ONE
    > dll solution for the solution that would incluse all the pictures and just
    > work.
    >
    > What's your thoughts on this?
    >
    > /Lars
    >
    >
    >
    > "Steve Lutz" <> skrev i meddelandet
    > news:uq6Spt%...
    >> If I am correct, you want to create a WebControl that creates an image
    >> AND
    >> includes the <img=>... tags when rendered, correct?
    >>
    >> You COULD put the binary image inline, but I would not recomend that.
    >>
    >> From a browser's point of view an img tag creates another request to the
    >> server to grab the image. So you would need 2 controls/pages:
    >> 1) The image creation page, which it looks like you aready have
    >> (images.aspx)
    >> 2) The web control which renders the <img> tag.
    >>
    >> The webcontrol will render something like "<img
    >> src="/images.aspx?parameters" height=x width=x/>"
    >> When the browser then gets this HTML, it will call up /images.aspx to
    >> grab
    >> the actual image.
    >>
    >> That's the most straight forward way of doing it that I can think of off
    >> hand.
    >>
    >> Steve
    >>
    >>
    >>
    >> "Lars Netzel" <> wrote in message
    >> news:...
    >>> Hey!
    >>>
    >>> I wrote a message yersterday and got some good answers and have now

    >> managed
    >>> to generate a nice image. The problem is that it's all generated in an
    >>> Images.Aspx file and I don't really want that. I am writing a WebControl
    >>> Library and I want to generate everything from there...
    >>>
    >>> In the Render Sub of the Control I output some HTML and there I need to
    >>> reference to a file in the <img> element, is there anyway to NOT have to
    >>> point to a aspx file (that generated the picture) there and instead
    >>> point

    >> to
    >>> a more local way that I can include in my WebControl Library?
    >>>
    >>> I guess it's possible to render the image as a file and put on the
    >>> serverdisk and then point to it but that would be a security risk I
    >>> guess
    >>> and can't really asume, that people that would use this control, like to

    >> set
    >>> permissions on the server to make it work.
    >>>
    >>> How do I do this?
    >>>
    >>> best regards/
    >>> Lars Netzel
    >>>
    >>>

    >>
    >>

    >
    >
     
    Kevin Spencer, Jan 6, 2005
    #4
  5. Lars Netzel

    Lars Netzel Guest

    So how does the big guys do this then, check this demosite out... It's a
    picture that I guess has do be dynamically rendered... and there's no aspx
    reference in the SRC of IMG element

    http://demo.xceedsoft.com/XceedChartExplorer/


    /Lars Netzel


    "Kevin Spencer" <> skrev i meddelandet
    news:OBZXio$...
    > Hi Lars,
    >
    > First, if your ASP.Net code is pretty much open to all, you have a SERIOUS
    > security hole on your web server!
    >
    > Second, you must understand that in a web page, an image is requested via
    > a URL. Now, you could always write a custom HTTP handler that handles the
    > image request, but you will still have to have a URL that the HTTP handler
    > can respond to. It is actually much simpler (and just as secure) to do it
    > the easy way, and write an ASPX page that serves up the image.
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > Neither a follower nor a lender be.
    >
    > "Lars Netzel" <> wrote in message
    > news:O67b7c$...
    >> Okay! Thanx, I was afraid of that that was the only way. The thign is
    >> I've seen really cool Chart Controls for the web that renders 3d
    >> illustrations using GDI+ and since they cost a lot I asume they have
    >> protected the code for the image rendering and if it is like you say..
    >> that you can only render the image from an aspx file.. the code is pretty
    >> much open to all... and also a bit harder to distribute, the user will
    >> need to add the aspx file to his projects.. I wanted to see if it's
    >> possible to make a ONE dll solution for the solution that would incluse
    >> all the pictures and just work.
    >>
    >> What's your thoughts on this?
    >>
    >> /Lars
    >>
    >>
    >>
    >> "Steve Lutz" <> skrev i meddelandet
    >> news:uq6Spt%...
    >>> If I am correct, you want to create a WebControl that creates an image
    >>> AND
    >>> includes the <img=>... tags when rendered, correct?
    >>>
    >>> You COULD put the binary image inline, but I would not recomend that.
    >>>
    >>> From a browser's point of view an img tag creates another request to the
    >>> server to grab the image. So you would need 2 controls/pages:
    >>> 1) The image creation page, which it looks like you aready have
    >>> (images.aspx)
    >>> 2) The web control which renders the <img> tag.
    >>>
    >>> The webcontrol will render something like "<img
    >>> src="/images.aspx?parameters" height=x width=x/>"
    >>> When the browser then gets this HTML, it will call up /images.aspx to
    >>> grab
    >>> the actual image.
    >>>
    >>> That's the most straight forward way of doing it that I can think of off
    >>> hand.
    >>>
    >>> Steve
    >>>
    >>>
    >>>
    >>> "Lars Netzel" <> wrote in message
    >>> news:...
    >>>> Hey!
    >>>>
    >>>> I wrote a message yersterday and got some good answers and have now
    >>> managed
    >>>> to generate a nice image. The problem is that it's all generated in an
    >>>> Images.Aspx file and I don't really want that. I am writing a
    >>>> WebControl
    >>>> Library and I want to generate everything from there...
    >>>>
    >>>> In the Render Sub of the Control I output some HTML and there I need to
    >>>> reference to a file in the <img> element, is there anyway to NOT have
    >>>> to
    >>>> point to a aspx file (that generated the picture) there and instead
    >>>> point
    >>> to
    >>>> a more local way that I can include in my WebControl Library?
    >>>>
    >>>> I guess it's possible to render the image as a file and put on the
    >>>> serverdisk and then point to it but that would be a security risk I
    >>>> guess
    >>>> and can't really asume, that people that would use this control, like
    >>>> to
    >>> set
    >>>> permissions on the server to make it work.
    >>>>
    >>>> How do I do this?
    >>>>
    >>>> best regards/
    >>>> Lars Netzel
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Lars Netzel, Jan 6, 2005
    #5
  6. Lars Netzel

    gerry Guest

    they are mapping the requested images to an image generating service on the
    server ( ie. rewriting xxx.png as ImageGen.aspx?xxx )


    "Lars Netzel" <> wrote in message
    news:%23X4ee$...
    > So how does the big guys do this then, check this demosite out... It's a
    > picture that I guess has do be dynamically rendered... and there's no aspx
    > reference in the SRC of IMG element
    >
    > http://demo.xceedsoft.com/XceedChartExplorer/
    >
    >
    > /Lars Netzel
    >
    >
    > "Kevin Spencer" <> skrev i meddelandet
    > news:OBZXio$...
    > > Hi Lars,
    > >
    > > First, if your ASP.Net code is pretty much open to all, you have a

    SERIOUS
    > > security hole on your web server!
    > >
    > > Second, you must understand that in a web page, an image is requested

    via
    > > a URL. Now, you could always write a custom HTTP handler that handles

    the
    > > image request, but you will still have to have a URL that the HTTP

    handler
    > > can respond to. It is actually much simpler (and just as secure) to do

    it
    > > the easy way, and write an ASPX page that serves up the image.
    > >
    > > --
    > > HTH,
    > >
    > > Kevin Spencer
    > > Microsoft MVP
    > > .Net Developer
    > > Neither a follower nor a lender be.
    > >
    > > "Lars Netzel" <> wrote in message
    > > news:O67b7c$...
    > >> Okay! Thanx, I was afraid of that that was the only way. The thign is
    > >> I've seen really cool Chart Controls for the web that renders 3d
    > >> illustrations using GDI+ and since they cost a lot I asume they have
    > >> protected the code for the image rendering and if it is like you say..
    > >> that you can only render the image from an aspx file.. the code is

    pretty
    > >> much open to all... and also a bit harder to distribute, the user will
    > >> need to add the aspx file to his projects.. I wanted to see if it's
    > >> possible to make a ONE dll solution for the solution that would incluse
    > >> all the pictures and just work.
    > >>
    > >> What's your thoughts on this?
    > >>
    > >> /Lars
    > >>
    > >>
    > >>
    > >> "Steve Lutz" <> skrev i meddelandet
    > >> news:uq6Spt%...
    > >>> If I am correct, you want to create a WebControl that creates an image
    > >>> AND
    > >>> includes the <img=>... tags when rendered, correct?
    > >>>
    > >>> You COULD put the binary image inline, but I would not recomend that.
    > >>>
    > >>> From a browser's point of view an img tag creates another request to

    the
    > >>> server to grab the image. So you would need 2 controls/pages:
    > >>> 1) The image creation page, which it looks like you aready have
    > >>> (images.aspx)
    > >>> 2) The web control which renders the <img> tag.
    > >>>
    > >>> The webcontrol will render something like "<img
    > >>> src="/images.aspx?parameters" height=x width=x/>"
    > >>> When the browser then gets this HTML, it will call up /images.aspx to
    > >>> grab
    > >>> the actual image.
    > >>>
    > >>> That's the most straight forward way of doing it that I can think of

    off
    > >>> hand.
    > >>>
    > >>> Steve
    > >>>
    > >>>
    > >>>
    > >>> "Lars Netzel" <> wrote in message
    > >>> news:...
    > >>>> Hey!
    > >>>>
    > >>>> I wrote a message yersterday and got some good answers and have now
    > >>> managed
    > >>>> to generate a nice image. The problem is that it's all generated in

    an
    > >>>> Images.Aspx file and I don't really want that. I am writing a
    > >>>> WebControl
    > >>>> Library and I want to generate everything from there...
    > >>>>
    > >>>> In the Render Sub of the Control I output some HTML and there I need

    to
    > >>>> reference to a file in the <img> element, is there anyway to NOT have
    > >>>> to
    > >>>> point to a aspx file (that generated the picture) there and instead
    > >>>> point
    > >>> to
    > >>>> a more local way that I can include in my WebControl Library?
    > >>>>
    > >>>> I guess it's possible to render the image as a file and put on the
    > >>>> serverdisk and then point to it but that would be a security risk I
    > >>>> guess
    > >>>> and can't really asume, that people that would use this control, like
    > >>>> to
    > >>> set
    > >>>> permissions on the server to make it work.
    > >>>>
    > >>>> How do I do this?
    > >>>>
    > >>>> best regards/
    > >>>> Lars Netzel
    > >>>>
    > >>>>
    > >>>
    > >>>
    > >>
    > >>

    > >
    > >

    >
    >
     
    gerry, Jan 6, 2005
    #6
  7. I've given you the basics. There are several ways to achieve this, one of
    which I mentioned: a custom HTTP Handler. With a custom HTTP Handler, you
    could use any file extension you like. However, as I said, that isn't
    necessary in your case, and would probably be much more difficult for you to
    implement, or you wouldn't have to ask.

    If I was steering you wrong, believe me, somebody would have told you by
    now! ;-)

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Neither a follower nor a lender be.

    "Lars Netzel" <> wrote in message
    news:%23X4ee$...
    > So how does the big guys do this then, check this demosite out... It's a
    > picture that I guess has do be dynamically rendered... and there's no aspx
    > reference in the SRC of IMG element
    >
    > http://demo.xceedsoft.com/XceedChartExplorer/
    >
    >
    > /Lars Netzel
    >
    >
    > "Kevin Spencer" <> skrev i meddelandet
    > news:OBZXio$...
    >> Hi Lars,
    >>
    >> First, if your ASP.Net code is pretty much open to all, you have a
    >> SERIOUS security hole on your web server!
    >>
    >> Second, you must understand that in a web page, an image is requested via
    >> a URL. Now, you could always write a custom HTTP handler that handles the
    >> image request, but you will still have to have a URL that the HTTP
    >> handler can respond to. It is actually much simpler (and just as secure)
    >> to do it the easy way, and write an ASPX page that serves up the image.
    >>
    >> --
    >> HTH,
    >>
    >> Kevin Spencer
    >> Microsoft MVP
    >> .Net Developer
    >> Neither a follower nor a lender be.
    >>
    >> "Lars Netzel" <> wrote in message
    >> news:O67b7c$...
    >>> Okay! Thanx, I was afraid of that that was the only way. The thign is
    >>> I've seen really cool Chart Controls for the web that renders 3d
    >>> illustrations using GDI+ and since they cost a lot I asume they have
    >>> protected the code for the image rendering and if it is like you say..
    >>> that you can only render the image from an aspx file.. the code is
    >>> pretty much open to all... and also a bit harder to distribute, the user
    >>> will need to add the aspx file to his projects.. I wanted to see if it's
    >>> possible to make a ONE dll solution for the solution that would incluse
    >>> all the pictures and just work.
    >>>
    >>> What's your thoughts on this?
    >>>
    >>> /Lars
    >>>
    >>>
    >>>
    >>> "Steve Lutz" <> skrev i meddelandet
    >>> news:uq6Spt%...
    >>>> If I am correct, you want to create a WebControl that creates an image
    >>>> AND
    >>>> includes the <img=>... tags when rendered, correct?
    >>>>
    >>>> You COULD put the binary image inline, but I would not recomend that.
    >>>>
    >>>> From a browser's point of view an img tag creates another request to
    >>>> the
    >>>> server to grab the image. So you would need 2 controls/pages:
    >>>> 1) The image creation page, which it looks like you aready have
    >>>> (images.aspx)
    >>>> 2) The web control which renders the <img> tag.
    >>>>
    >>>> The webcontrol will render something like "<img
    >>>> src="/images.aspx?parameters" height=x width=x/>"
    >>>> When the browser then gets this HTML, it will call up /images.aspx to
    >>>> grab
    >>>> the actual image.
    >>>>
    >>>> That's the most straight forward way of doing it that I can think of
    >>>> off
    >>>> hand.
    >>>>
    >>>> Steve
    >>>>
    >>>>
    >>>>
    >>>> "Lars Netzel" <> wrote in message
    >>>> news:...
    >>>>> Hey!
    >>>>>
    >>>>> I wrote a message yersterday and got some good answers and have now
    >>>> managed
    >>>>> to generate a nice image. The problem is that it's all generated in an
    >>>>> Images.Aspx file and I don't really want that. I am writing a
    >>>>> WebControl
    >>>>> Library and I want to generate everything from there...
    >>>>>
    >>>>> In the Render Sub of the Control I output some HTML and there I need
    >>>>> to
    >>>>> reference to a file in the <img> element, is there anyway to NOT have
    >>>>> to
    >>>>> point to a aspx file (that generated the picture) there and instead
    >>>>> point
    >>>> to
    >>>>> a more local way that I can include in my WebControl Library?
    >>>>>
    >>>>> I guess it's possible to render the image as a file and put on the
    >>>>> serverdisk and then point to it but that would be a security risk I
    >>>>> guess
    >>>>> and can't really asume, that people that would use this control, like
    >>>>> to
    >>>> set
    >>>>> permissions on the server to make it work.
    >>>>>
    >>>>> How do I do this?
    >>>>>
    >>>>> best regards/
    >>>>> Lars Netzel
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Kevin Spencer, Jan 6, 2005
    #7
  8. Lars Netzel

    Lars Netzel Guest

    I appriciate you answers and your time spent on this thread. I just wanted
    to see if there were other options than using an aspx file as image source.

    I guess we'll wait until asp.net 2.0 and see what the DynamicImage control
    can achieve!

    /Lars


    "Kevin Spencer" <> skrev i meddelandet
    news:...
    > I've given you the basics. There are several ways to achieve this, one of
    > which I mentioned: a custom HTTP Handler. With a custom HTTP Handler, you
    > could use any file extension you like. However, as I said, that isn't
    > necessary in your case, and would probably be much more difficult for you
    > to implement, or you wouldn't have to ask.
    >
    > If I was steering you wrong, believe me, somebody would have told you by
    > now! ;-)
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > Neither a follower nor a lender be.
    >
    > "Lars Netzel" <> wrote in message
    > news:%23X4ee$...
    >> So how does the big guys do this then, check this demosite out... It's a
    >> picture that I guess has do be dynamically rendered... and there's no
    >> aspx reference in the SRC of IMG element
    >>
    >> http://demo.xceedsoft.com/XceedChartExplorer/
    >>
    >>
    >> /Lars Netzel
    >>
    >>
    >> "Kevin Spencer" <> skrev i meddelandet
    >> news:OBZXio$...
    >>> Hi Lars,
    >>>
    >>> First, if your ASP.Net code is pretty much open to all, you have a
    >>> SERIOUS security hole on your web server!
    >>>
    >>> Second, you must understand that in a web page, an image is requested
    >>> via a URL. Now, you could always write a custom HTTP handler that
    >>> handles the image request, but you will still have to have a URL that
    >>> the HTTP handler can respond to. It is actually much simpler (and just
    >>> as secure) to do it the easy way, and write an ASPX page that serves up
    >>> the image.
    >>>
    >>> --
    >>> HTH,
    >>>
    >>> Kevin Spencer
    >>> Microsoft MVP
    >>> .Net Developer
    >>> Neither a follower nor a lender be.
    >>>
    >>> "Lars Netzel" <> wrote in message
    >>> news:O67b7c$...
    >>>> Okay! Thanx, I was afraid of that that was the only way. The thign is
    >>>> I've seen really cool Chart Controls for the web that renders 3d
    >>>> illustrations using GDI+ and since they cost a lot I asume they have
    >>>> protected the code for the image rendering and if it is like you say..
    >>>> that you can only render the image from an aspx file.. the code is
    >>>> pretty much open to all... and also a bit harder to distribute, the
    >>>> user will need to add the aspx file to his projects.. I wanted to see
    >>>> if it's possible to make a ONE dll solution for the solution that would
    >>>> incluse all the pictures and just work.
    >>>>
    >>>> What's your thoughts on this?
    >>>>
    >>>> /Lars
    >>>>
    >>>>
    >>>>
    >>>> "Steve Lutz" <> skrev i meddelandet
    >>>> news:uq6Spt%...
    >>>>> If I am correct, you want to create a WebControl that creates an image
    >>>>> AND
    >>>>> includes the <img=>... tags when rendered, correct?
    >>>>>
    >>>>> You COULD put the binary image inline, but I would not recomend that.
    >>>>>
    >>>>> From a browser's point of view an img tag creates another request to
    >>>>> the
    >>>>> server to grab the image. So you would need 2 controls/pages:
    >>>>> 1) The image creation page, which it looks like you aready have
    >>>>> (images.aspx)
    >>>>> 2) The web control which renders the <img> tag.
    >>>>>
    >>>>> The webcontrol will render something like "<img
    >>>>> src="/images.aspx?parameters" height=x width=x/>"
    >>>>> When the browser then gets this HTML, it will call up /images.aspx to
    >>>>> grab
    >>>>> the actual image.
    >>>>>
    >>>>> That's the most straight forward way of doing it that I can think of
    >>>>> off
    >>>>> hand.
    >>>>>
    >>>>> Steve
    >>>>>
    >>>>>
    >>>>>
    >>>>> "Lars Netzel" <> wrote in message
    >>>>> news:...
    >>>>>> Hey!
    >>>>>>
    >>>>>> I wrote a message yersterday and got some good answers and have now
    >>>>> managed
    >>>>>> to generate a nice image. The problem is that it's all generated in
    >>>>>> an
    >>>>>> Images.Aspx file and I don't really want that. I am writing a
    >>>>>> WebControl
    >>>>>> Library and I want to generate everything from there...
    >>>>>>
    >>>>>> In the Render Sub of the Control I output some HTML and there I need
    >>>>>> to
    >>>>>> reference to a file in the <img> element, is there anyway to NOT have
    >>>>>> to
    >>>>>> point to a aspx file (that generated the picture) there and instead
    >>>>>> point
    >>>>> to
    >>>>>> a more local way that I can include in my WebControl Library?
    >>>>>>
    >>>>>> I guess it's possible to render the image as a file and put on the
    >>>>>> serverdisk and then point to it but that would be a security risk I
    >>>>>> guess
    >>>>>> and can't really asume, that people that would use this control, like
    >>>>>> to
    >>>>> set
    >>>>>> permissions on the server to make it work.
    >>>>>>
    >>>>>> How do I do this?
    >>>>>>
    >>>>>> best regards/
    >>>>>> Lars Netzel
    >>>>>>
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Lars Netzel, Jan 6, 2005
    #8
  9. Lars Netzel

    Lars Netzel Guest

    okey, thanx, so they are also in need of an "online" service for the
    picture, might not be a local "kick ass" solution that I thought.

    /Lars


    "gerry" <> skrev i meddelandet
    news:...
    > they are mapping the requested images to an image generating service on
    > the
    > server ( ie. rewriting xxx.png as ImageGen.aspx?xxx )
    >
    >
    > "Lars Netzel" <> wrote in message
    > news:%23X4ee$...
    >> So how does the big guys do this then, check this demosite out... It's a
    >> picture that I guess has do be dynamically rendered... and there's no
    >> aspx
    >> reference in the SRC of IMG element
    >>
    >> http://demo.xceedsoft.com/XceedChartExplorer/
    >>
    >>
    >> /Lars Netzel
    >>
    >>
    >> "Kevin Spencer" <> skrev i meddelandet
    >> news:OBZXio$...
    >> > Hi Lars,
    >> >
    >> > First, if your ASP.Net code is pretty much open to all, you have a

    > SERIOUS
    >> > security hole on your web server!
    >> >
    >> > Second, you must understand that in a web page, an image is requested

    > via
    >> > a URL. Now, you could always write a custom HTTP handler that handles

    > the
    >> > image request, but you will still have to have a URL that the HTTP

    > handler
    >> > can respond to. It is actually much simpler (and just as secure) to do

    > it
    >> > the easy way, and write an ASPX page that serves up the image.
    >> >
    >> > --
    >> > HTH,
    >> >
    >> > Kevin Spencer
    >> > Microsoft MVP
    >> > .Net Developer
    >> > Neither a follower nor a lender be.
    >> >
    >> > "Lars Netzel" <> wrote in message
    >> > news:O67b7c$...
    >> >> Okay! Thanx, I was afraid of that that was the only way. The thign is
    >> >> I've seen really cool Chart Controls for the web that renders 3d
    >> >> illustrations using GDI+ and since they cost a lot I asume they have
    >> >> protected the code for the image rendering and if it is like you say..
    >> >> that you can only render the image from an aspx file.. the code is

    > pretty
    >> >> much open to all... and also a bit harder to distribute, the user will
    >> >> need to add the aspx file to his projects.. I wanted to see if it's
    >> >> possible to make a ONE dll solution for the solution that would
    >> >> incluse
    >> >> all the pictures and just work.
    >> >>
    >> >> What's your thoughts on this?
    >> >>
    >> >> /Lars
    >> >>
    >> >>
    >> >>
    >> >> "Steve Lutz" <> skrev i meddelandet
    >> >> news:uq6Spt%...
    >> >>> If I am correct, you want to create a WebControl that creates an
    >> >>> image
    >> >>> AND
    >> >>> includes the <img=>... tags when rendered, correct?
    >> >>>
    >> >>> You COULD put the binary image inline, but I would not recomend that.
    >> >>>
    >> >>> From a browser's point of view an img tag creates another request to

    > the
    >> >>> server to grab the image. So you would need 2 controls/pages:
    >> >>> 1) The image creation page, which it looks like you aready have
    >> >>> (images.aspx)
    >> >>> 2) The web control which renders the <img> tag.
    >> >>>
    >> >>> The webcontrol will render something like "<img
    >> >>> src="/images.aspx?parameters" height=x width=x/>"
    >> >>> When the browser then gets this HTML, it will call up /images.aspx to
    >> >>> grab
    >> >>> the actual image.
    >> >>>
    >> >>> That's the most straight forward way of doing it that I can think of

    > off
    >> >>> hand.
    >> >>>
    >> >>> Steve
    >> >>>
    >> >>>
    >> >>>
    >> >>> "Lars Netzel" <> wrote in message
    >> >>> news:...
    >> >>>> Hey!
    >> >>>>
    >> >>>> I wrote a message yersterday and got some good answers and have now
    >> >>> managed
    >> >>>> to generate a nice image. The problem is that it's all generated in

    > an
    >> >>>> Images.Aspx file and I don't really want that. I am writing a
    >> >>>> WebControl
    >> >>>> Library and I want to generate everything from there...
    >> >>>>
    >> >>>> In the Render Sub of the Control I output some HTML and there I need

    > to
    >> >>>> reference to a file in the <img> element, is there anyway to NOT
    >> >>>> have
    >> >>>> to
    >> >>>> point to a aspx file (that generated the picture) there and instead
    >> >>>> point
    >> >>> to
    >> >>>> a more local way that I can include in my WebControl Library?
    >> >>>>
    >> >>>> I guess it's possible to render the image as a file and put on the
    >> >>>> serverdisk and then point to it but that would be a security risk I
    >> >>>> guess
    >> >>>> and can't really asume, that people that would use this control,
    >> >>>> like
    >> >>>> to
    >> >>> set
    >> >>>> permissions on the server to make it work.
    >> >>>>
    >> >>>> How do I do this?
    >> >>>>
    >> >>>> best regards/
    >> >>>> Lars Netzel
    >> >>>>
    >> >>>>
    >> >>>
    >> >>>
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
    Lars Netzel, Jan 6, 2005
    #9
    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. =?Utf-8?B?RGFtacOhbg==?=

    RE: Dynamically generating image buttons with text

    =?Utf-8?B?RGFtacOhbg==?=, May 13, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    406
    =?Utf-8?B?RGFtacOhbg==?=
    May 13, 2004
  2. =?Utf-8?B?UnVkeQ==?=

    Image thing question

    =?Utf-8?B?UnVkeQ==?=, May 26, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    388
    Brock Allen
    May 30, 2005
  3. Laszlo Zsolt Nagy
    Replies:
    1
    Views:
    1,436
    Kartic
    Jan 26, 2005
  4. Zam
    Replies:
    1
    Views:
    267
    Mark Schupp
    Mar 14, 2005
  5. Navu

    image related thing in website

    Navu, Jan 23, 2006, in forum: Javascript
    Replies:
    2
    Views:
    100
    Thomas 'PointedEars' Lahn
    Jan 23, 2006
Loading...

Share This Page