views:

240

answers:

2

I have an ASP.Net 3.5 application in which I would like to setup some web services for AJAX consumption for ONLY within the application they reside. There is no foreseeable need to expose them to anything beyond the application in which they live. That being said, is there any particular benefit to use WCF over ASMX or viceversa to expose these services? ASMX services certainly seem to have an easier setup that WCF but I want to be sure that I follow best practices.

A: 

See Microsoft: ASMX Web Services are a “Legacy Technology”.

That said, although I don't know one way or another, it seems to me that Microsoft might let you slide on "page methods".

John Saunders
+2  A: 

Personally, I'm still using ASMX for that scenario.

ASMX isn't going anywhere until at least ASP.NET 5+. With that in mind, I can't help but see the additional work to set up WCF services as wasted effort in a purely AJAX-consumption scenario.

Dave Ward
You may be right that it's "not going anywhere". But it's also the case that if there are bugs, then they're "not going" to be fixed.
John Saunders
If we're going for FUD, you could also suggest that bugs are more likely in the newer and less mature WCF. :)
Dave Ward