开发者

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

开发者 https://www.devze.com 2022-12-25 13:03 出处:网络
(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

(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

精彩评论

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

关注公众号