Question

Can i use ashx handlers or not?recently one of my friend told that Microsoft stopped supporting ashx handlers and suggested to use asmx or wcf.

I have searched over web for this. i am not able to finalize whether it actually does it or not.

So any one please tell me whether Microsoft support for ashx or not.?.

Was it helpful?

Solution

No, support for HTTP Handlers (.ashx, both IIS registered and file endpoints) are still fully supported in ASP.NET 4.5.

I believe your friend was misinformed or confused.

As for your friend's recommendation about using .asmx or WCF in place of HTTP Handlers is misguided advice, as the purpose of the two technologies (HTTP Handlers vs. web services) are very different.

If anything, the recommendation should be to not use .asmx web services anymore in favor of WCF, ASP.NET Web API or a REST-based service.

For proof of support, you need to look no further than the Add New Item dialog inside Visual Studio 2012:

enter image description here

Note: The ASP.NET Handler option highlighted.

OTHER TIPS

As far as I know Microsoft has never announced to stop supporting the .NET framework including webforms. ASHX files are an essential tool to accomplisch certain activities

I use it mainly for downloading files from the website using a bitstream.

To exchange information (text, XML, Json) a webmethod is preferred. Wether that resides in de aspx code behind or a seperate ASMX file is of no concern.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top