Questions tagged [openrasta]

OpenRasta is an open-source MVC framework that can run on .net 2.0 and above, built from the ground-up to enable ReSTful scenarios.

Resources

OpenRasta Site
OpenRasta GitHub Project
OpenRasta Documentation Wiki

149 questions
4
votes
0 answers

Measuring response time in open rasta

What is the best way to do this? I was thinking about something like: public void Initialize(IPipeline pipelineRunner) { pipelineRunner .Notify(CaptureRequestStartTime) .Before(); …
Nick
  • 1,845
  • 3
  • 15
  • 22
4
votes
1 answer

OpenRasta Mocking HttpContext in Unit Tests

Currently i am writing a unit tests for my handler methods using NUnit.I have used HttpContext.Current in one of my Controller Methods which throws NULL reference exception at HttpContext.Current when i execute test cases for my handler. Is there…
prashant
  • 2,181
  • 2
  • 22
  • 37
3
votes
1 answer

How to use StructureMap with OpenRasta

How do I use StructureMap with OpenRasta? Can I use it in place of the internal dependency resolver, or is it only possible to use it in conjunction with the built-in DI (i.e. for my own app's dependencies)? Thanks
Dave Nichol
  • 181
  • 3
  • 8
3
votes
1 answer

Versioning of media types in OpenRasta

What is the proper way to version media types in openrasta? Up to this point on one of our rest api's we specified custom media types with the version number in them: application/vnd.company.Entity-v1+xml Currently all of these media types are just…
Sean Chambers
  • 8,572
  • 7
  • 41
  • 55
3
votes
1 answer

ELMAH - How to log HTTP request body and HTTP request header with error log?

I'm logging errors by specifically signalling errors ErrorSignal.FromCurrentContext().Raise(exception); How do I add request body and headers in the errors details. I'm just using the email feature.
IsmailS
  • 10,797
  • 21
  • 82
  • 134
3
votes
2 answers

OpenRasta - Encoding Errors as JSON rather than HTML

I notice OpenRasta.Core has an HtmlErrorCodec which is responsible for rendering a the server error page sent out when a handler throws an Exception. When I make an JSON Ajax request to an exception throwing handler this Codec is selected and the…
Neil Mosafi
  • 460
  • 1
  • 4
  • 14
3
votes
1 answer

Custom Authentication OpenRasta

Hi I´m building an application that has a token based authentication ex: http://www.host.com/resource?token=589437534 I was going write an interceptor or something like that, but I imagine that there is something more elegant available that I just…
MIchel
  • 253
  • 1
  • 2
  • 5
3
votes
1 answer

OpenRasta Framework for component (or composite) based web application

we are trying to build a more loosely coupled composite based web application, and looking at various options and frameworks. The idea is like when the user browse to a page, the uri will be resolved on the server for a resource and a list of…
Eatdoku
  • 6,569
  • 13
  • 63
  • 98
3
votes
1 answer

REST API with OpenRasta and ASP.NET MVC

REST API Questions: Does anyone know any good tutorial that shows how to do form based authentication with OpenRasta? How difficult would it be to convert REST API from MVC to OpenRasta in future? I know OpenRasta has advantages over MVC. How…
kheya
  • 7,546
  • 20
  • 77
  • 109
3
votes
1 answer

Using codec file extensions with OpenRasta returns 404

When using codec uri file extensions with OpenRasta, OR can't resolve the uri and returns a 404. Without the file extension all works ok. The codecs are defined for the object resource and I'm using both XmlDataContract and JsonDataContract. Using…
Shane22
  • 33
  • 2
3
votes
1 answer

Can you post a file, and a resource at the same time in OpenRasta?

Is it possible to upload a file, and post meta data (in the post body) at the same time in OpenRasta? and if so, do you have an example of how to do this?
Matt Brailsford
  • 2,209
  • 3
  • 28
  • 40
3
votes
2 answers

OpenRasta - Scott Littlewoods Basic Authentication working example

I'm testing out the feasibility of using OpenRasta as a viable alternative to ASP.NET MVC. However, I've run into a stumbling block regarding authentication. Let me be clear, "Open Digest Authentication" is NOT an option at this point. I've read…
ph2004
  • 77
  • 6
3
votes
2 answers

OpenRasta return list via JsonDataContractCodec

Suppose I have a resource like below: namespace OpenRastaApp.Resources { public class Foo { public string Bar { get; set; } } } a handler like: namespace OpenRastaApp.Handlers { public class FooHandler { public…
ktak
  • 596
  • 3
  • 9
3
votes
1 answer

In OpenRasta, how do I configure a URI where I get "the remainder of the path" as a single string?

Normally in OpenRasta there is some configuration like this: ResourceSpace.Has.ResourcesOfType() .AtUri("/customers/region/{region}") ... // and so on ... where the {region} part of the path is automatically mapped to a string…
Daniel Earwicker
  • 114,894
  • 38
  • 205
  • 284
3
votes
1 answer

openrasta xml request being returned as json

I have a very simple OpenRasta app with a Home resource with a single string property of Title (straight from the OpenRasta community doc example). I've set up both XML and JSON data contracts for the resource like…
kindohm
  • 1,580
  • 18
  • 38
1
2
3
9 10