Is it possible to serve up a resource as both JSON and Aspx with OpenRasta?
- by Jeffrey Cameron
(I'm also asking this on the OpenRasta google group)
Hey all,
I've been using OpenRasta to convert an old web application we have
into something RESTful. IS it possible to serve up a resource (or
specifically a list of resources) as both .aspx and JSON? I have
tried this but no matter what I try I keep getting the .aspx back ...
any ideas? Here's a sample configuration:
ResourceSpace.Has.ResourcesOfType<List<Valueset>>()
.AtUri("/valuesets")
.HandledBy<ValuesetHandler>()
.AsJsonDataContract()
.And.AsXmlDataContract()
.And.RenderedByAspx("~/Views/VauesetView.aspx")