ASP.NET with ashx files

Discussion in 'ASP .Net' started by Roshawn Dawson, Oct 24, 2005.

  1. Hi,

    Has anybody created an entire asp.net app using only ashx files? I know that they are simply
    handlers used by the asp.net worker process. I hear that they are in some respects better than
    using aspx files because they don't have to be compiled and don't need any page processing.

    As an experiment, I'm creating an affiliate site that will use ashx files mainly. During testing I
    haven't noticed anything different other than it seems to run slightly faster. But there are many
    unknowns. What security issues are there with ashx files? Any gotchas to be aware of?

    Thanks,
    Roshawn
     
    Roshawn Dawson, Oct 24, 2005
    #1
    1. Advertising

  2. The statement about "ASHX is better than ASPX because it don't need
    compile..." is wrong.

    ASPX files can use no code-behind using inline style (i.e.: something like
    <script language="vb\c#" runat="server"></script>), and sometimes header
    file need to be compiled too if they have code-behind.

    P.S.: FYI in ASP.NET 2.0 you can choosing to compile-on-the-fly even if
    you're using code-behind.

    "Roshawn Dawson" <>
    ???????:%23$...
    > Hi,
    >
    > Has anybody created an entire asp.net app using only ashx files? I know
    > that they are simply handlers used by the asp.net worker process. I hear
    > that they are in some respects better than using aspx files because they
    > don't have to be compiled and don't need any page processing.
    >
    > As an experiment, I'm creating an affiliate site that will use ashx files
    > mainly. During testing I haven't noticed anything different other than it
    > seems to run slightly faster. But there are many unknowns. What security
    > issues are there with ashx files? Any gotchas to be aware of?
    >
    > Thanks,
    > Roshawn
     
    Lau Lei Cheong, Oct 24, 2005
    #2
    1. Advertising

  3. Hmmm... that's something that needs to be considered. It never crossed my mind that inline scripts
    in asp.net could in fact be better than ashx files as no one has ever compared the two.

    Thanks Lau. :)

    Lau Lei Cheong wrote:
    > The statement about "ASHX is better than ASPX because it don't need
    > compile..." is wrong.
    >
    > ASPX files can use no code-behind using inline style (i.e.: something like
    > <script language="vb\c#" runat="server"></script>), and sometimes header
    > file need to be compiled too if they have code-behind.
    >
    > P.S.: FYI in ASP.NET 2.0 you can choosing to compile-on-the-fly even if
    > you're using code-behind.
    >
    > "Roshawn Dawson" <>
    > ???????:%23$...
    >
    >>Hi,
    >>
    >>Has anybody created an entire asp.net app using only ashx files? I know
    >>that they are simply handlers used by the asp.net worker process. I hear
    >>that they are in some respects better than using aspx files because they
    >>don't have to be compiled and don't need any page processing.
    >>
    >>As an experiment, I'm creating an affiliate site that will use ashx files
    >>mainly. During testing I haven't noticed anything different other than it
    >>seems to run slightly faster. But there are many unknowns. What security
    >>issues are there with ashx files? Any gotchas to be aware of?
    >>
    >>Thanks,
    >>Roshawn

    >
    >
    >
     
    Roshawn Dawson, Oct 24, 2005
    #3
  4. Roshawn Dawson

    Scott Allen Guest

    ASHX files are great for specific tasks, and a quick look for ASHX on
    a search engine will show how people are using HttpHandlers.

    As for building an entire site - I 'd be hesitant to try.
    Constructing a UI for the end user will be a very raw and low level
    experience in an ASHX file. You won't have declarative programming
    with the ASP.NET server controls, and productivity will take a
    nosedive.

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    On Sun, 23 Oct 2005 19:49:32 -0500, Roshawn Dawson
    <> wrote:

    >Hi,
    >
    >Has anybody created an entire asp.net app using only ashx files? I know that they are simply
    >handlers used by the asp.net worker process. I hear that they are in some respects better than
    >using aspx files because they don't have to be compiled and don't need any page processing.
    >
    >As an experiment, I'm creating an affiliate site that will use ashx files mainly. During testing I
    >haven't noticed anything different other than it seems to run slightly faster. But there are many
    >unknowns. What security issues are there with ashx files? Any gotchas to be aware of?
    >
    >Thanks,
    >Roshawn
     
    Scott Allen, Oct 24, 2005
    #4
  5. Roshawn Dawson

    Bruce Barker Guest

    ashx pages need to be compiled just like an aspx page. the difference is the
    processing. an aspx page runs thru the page life cycle calling the page
    events, the ashx has fewer events.

    ashx pages are fine if you want to handle the postback logic yourself, and
    generate mostly html controls. perfect if you are using xlst for html
    rendering.

    -- bruce (sqlwork.com)


    "Roshawn Dawson" <> wrote in message
    news:%23$...
    > Hi,
    >
    > Has anybody created an entire asp.net app using only ashx files? I know
    > that they are simply handlers used by the asp.net worker process. I hear
    > that they are in some respects better than using aspx files because they
    > don't have to be compiled and don't need any page processing.
    >
    > As an experiment, I'm creating an affiliate site that will use ashx files
    > mainly. During testing I haven't noticed anything different other than it
    > seems to run slightly faster. But there are many unknowns. What security
    > issues are there with ashx files? Any gotchas to be aware of?
    >
    > Thanks,
    > Roshawn
     
    Bruce Barker, Oct 24, 2005
    #5
  6. Hi guys,

    I've read your replies and am pleased with your knowledge.

    Scott Allen said:
    "As for building an entire site - I 'd be hesitant to try. Constructing a UI for the end user will
    be a very raw and low level experience in an ASHX file. You won't have declarative programming with
    the ASP.NET server controls, and productivity will take a nosedive."

    I hear you, Scott. In my situation server controls aren't used at all. As for declarative
    programming there is a simple, albeit nagging solution. I write all my code in a class file. That
    way I get the declarative programming necessary to make things work. After testing the code I
    simply copy and paste the code in the class file into the ashx file. Things work perfectly for me
    this way. But keep in mind that I'm not using any server controls, so this technique may not be
    suitable for all asp.net developers.

    Bruce Barker, you hit the nail on the head. I'm simply using xml and xslt to render the output to
    the browser. Html controls are being used. And because the ashx files don't run through the page
    life cycle like an aspx file, it could be just a wee-bit faster. IMO, any speed improvement is
    worth the extra effort if it doesn't compromise productivity.

    Thanks guys!

    Bruce Barker wrote:
    > ashx pages need to be compiled just like an aspx page. the difference is the
    > processing. an aspx page runs thru the page life cycle calling the page
    > events, the ashx has fewer events.
    >
    > ashx pages are fine if you want to handle the postback logic yourself, and
    > generate mostly html controls. perfect if you are using xlst for html
    > rendering.
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "Roshawn Dawson" <> wrote in message
    > news:%23$...
    >
    >>Hi,
    >>
    >>Has anybody created an entire asp.net app using only ashx files? I know
    >>that they are simply handlers used by the asp.net worker process. I hear
    >>that they are in some respects better than using aspx files because they
    >>don't have to be compiled and don't need any page processing.
    >>
    >>As an experiment, I'm creating an affiliate site that will use ashx files
    >>mainly. During testing I haven't noticed anything different other than it
    >>seems to run slightly faster. But there are many unknowns. What security
    >>issues are there with ashx files? Any gotchas to be aware of?
    >>
    >>Thanks,
    >>Roshawn

    >
    >
    >
     
    Roshawn Dawson, Oct 24, 2005
    #6
    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?TGFrc2htaSBOYXJheWFuYW4uUg==?=

    Question Title: How to work with .ASHX files in vs.net 2005 beta?

    =?Utf-8?B?TGFrc2htaSBOYXJheWFuYW4uUg==?=, Sep 22, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    347
    =?Utf-8?B?TGFrc2htaSBOYXJheWFuYW4uUg==?=
    Sep 22, 2004
  2. Roshawn Dawson

    .ASHX files, Anyone?

    Roshawn Dawson, Apr 17, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    4,844
    Alvin Bruney [MVP - ASP.NET]
    Apr 17, 2005
  3. Philipp Schmid [MSFT]

    What is the assembly name to use for new ASHX files

    Philipp Schmid [MSFT], Nov 2, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    3,554
    Juan T. Llibre
    Nov 3, 2005
  4. Juan T. Llibre
    Replies:
    2
    Views:
    536
    Juan T. Llibre
    Nov 3, 2005
  5. Augustin Prasanna

    Web Setup Project - How to add .ashx files?

    Augustin Prasanna, Oct 19, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    573
    Augustin Prasanna
    Oct 19, 2006
Loading...

Share This Page