开发者

Is it possible to serve up a resource as both JSON and Aspx with OpenRasta?

(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")


GET /valuesets
Accept: application/json
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜