Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.NET with ashx files

Reply
Thread Tools

ASP.NET with ashx files

 
 
Roshawn Dawson
Guest
Posts: n/a
 
      10-24-2005
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
 
Reply With Quote
 
 
 
 
Lau Lei Cheong
Guest
Posts: n/a
 
      10-24-2005
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" <(E-Mail Removed)>
???????:%23$(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
Roshawn Dawson
Guest
Posts: n/a
 
      10-24-2005
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" <(E-Mail Removed)>
> ???????:%23$(E-Mail Removed)...
>
>>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

>
>
>

 
Reply With Quote
 
Scott Allen
Guest
Posts: n/a
 
      10-24-2005
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
<(E-Mail Removed)> 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


 
Reply With Quote
 
Bruce Barker
Guest
Posts: n/a
 
      10-24-2005
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" <(E-Mail Removed)> wrote in message
news:%23$(E-Mail Removed)...
> 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



 
Reply With Quote
 
Roshawn Dawson
Guest
Posts: n/a
 
      10-24-2005
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" <(E-Mail Removed)> wrote in message
> news:%23$(E-Mail Removed)...
>
>>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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Setup Project - How to add .ashx files? Augustin Prasanna ASP .Net 0 10-19-2006 07:54 AM
Re: What is the assembly name to use for new ASHX files Juan T. Llibre ASP .Net 2 11-03-2005 05:06 PM
What is the assembly name to use for new ASHX files Philipp Schmid [MSFT] ASP .Net 6 11-03-2005 02:49 PM
.ASHX files, Anyone? Roshawn Dawson ASP .Net 2 04-17-2005 02:48 AM
Question Title: How to work with .ASHX files in vs.net 2005 beta? =?Utf-8?B?TGFrc2htaSBOYXJheWFuYW4uUg==?= ASP .Net 0 09-22-2004 06:59 AM



Advertisments