tags:

views:

36

answers:

3

How to respond to HTTP GET with c#/.net and XML

What I am trying to is when another service call posts to a get with say 5 parameters. This service would respond with an appropriate xml file.

Is WCF the way to go? Any good examples out there?

Is this way easier/faster on some other platform?

+2  A: 

One very easy option is to simply host an ASP.NET MVC web application ... you can have an action method that maps to the URL you are interested in which would take the parameters and return the XML:
http://asp.net/mvc

Joel Martinez
Of course it doesn't need to be an MVC app. Just a regular ASPNET page is quite capable of accepting params and returning XML.
Cheeso
True, but the MVC routing makes it very simple and clean.
Tim Jarvis
A: 

If you havve just one service method to support, then I'd say yes, use ASPNET: it's simple and easy.

If you are building a REST infrastructure and you want logging, multi-protocol capability, a variety of REST documents and verbs, and so on, then I'd recommend WCF.

Cheeso