Returning xml from asmx webmethod call?
Someone asked on Stack Overflow:
Is it possible to return plain old xml using an asmx file? Without the SOAP stuff?
I posted the following answer, which was chosen as the accepted answer and received 2 upvotes:
I would recommend you look into a generic handler if your goal is to avoid SOAP. Start here to for some info on using generic handlers, also called ASHX handlers.
From a generic handler, you can return whatever data you like. Using an asmx file for such purposes would be confusing for future developers and it adds complexity that you likely don’t need.
Originally posted on Stack Overflow — 2 upvotes (accepted answer). Licensed under CC BY-SA.