Is it possible to serve up a resource as both JSON and Aspx with OpenRasta?
        Posted  
        
            by Jeffrey Cameron
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jeffrey Cameron
        
        
        
        Published on 2010-03-29T12:39:10Z
        Indexed on 
            2010/03/29
            12:43 UTC
        
        
        Read the original article
        Hit count: 514
        
(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")
© Stack Overflow or respective owner