openrasta

Can I register multiple resources with one handler and one URI in Open Rasta?

故事扮演 提交于 2019-12-22 01:43:45
问题 I want to register mutliple resources with one handler and one URI.so want to confirm that is this possible in open rasta. I have gone through a bit of websites regarding open rasta but couldn't able to conclude that whether this is possible or not? ResourceSpace.Has .ResourcesOfType<Request>() .AtUri("/processing") .HandledBy<SomeHandler>() .TranscodedBy<SomeCodec>(); I need to handle all the request which are derived from the base class "Request". It would be great if some body could

Getting started with OpenRasta [closed]

ε祈祈猫儿з 提交于 2019-12-20 08:30:42
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Hi can anyone suggest ways of getting started with OpenRasta? Perhaps articles, tutorials, sample apps & documentation? 回答1: Have some blog posts: OpenRasta Introduction OpenRasta - How to speak REST Whats so good about OpenRasta OpenRasta Introduction Handlers and OperationResults in OpenRasta A better

IIS 7.5 + enable PUT and DELETE for RESTFul service, extensionless

放肆的年华 提交于 2019-12-17 03:51:40
问题 i am trying to understand how IIS 7.5 handles POST and PUT request. I am writing a RESTful service using OpenRasta framework. The POST operation works without any problem, but the PUT operation for the same URL does not. It returns error like the following Detailed Error Information Module: IIS Web Core Notification: MapRequestHandler Handler: StaticFile Error Code: 0x80070002 the url is like this following "http://localhost/MyService/Resource.Something.manifest" Same setup works fine in

Uploading with multipart/form-data using OpenRasta and IMultipartHttpEntity

眉间皱痕 提交于 2019-12-13 01:59:16
问题 I'm trying to post some files using OpenRasta. I've gotten as far as getting my handler called, but by all appearances the stream in the entity is empty. Here's my handler: public OperationResult Post( IEnumerable<IMultipartHttpEntity> entities) { var foo = entities.ToList(); foreach (var entity in foo) { if (entity.Stream != null && entity.ContentType != null) { var memoryStream = new MemoryStream(); entity.Stream.CopyTo(memoryStream); } } return new OperationResult.Created(); } Each time

Is it possible to use HTTPS with OpenRasta?

眉间皱痕 提交于 2019-12-11 04:45:57
问题 Does anyone know if it is possible to use HTTPS with OpenRasta rather than plain HTTP? I need HTTPS so that sensitive information can be transferred without any risk.. 回答1: Nothing prevents you from using openrasta with SSL, it's supported. You'll have to ensure that your host environment (asp.net I assume?) is configured properly for it. 来源: https://stackoverflow.com/questions/2516268/is-it-possible-to-use-https-with-openrasta

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

霸气de小男生 提交于 2019-12-10 20:44:46
问题 Normally in OpenRasta there is some configuration like this: ResourceSpace.Has.ResourcesOfType<Customers>() .AtUri("/customers/region/{region}") ... // and so on ... where the {region} part of the path is automatically mapped to a string parameter in the handling method. So if the user hits: http://server/customers/region/emea Then the handler method is passed the string "emea". As well as doing this, I'd like to register a handler with something like this: ResourceSpace.Has.ResourcesOfType

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

倾然丶 夕夏残阳落幕 提交于 2019-12-10 18:35:10
问题 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. 回答1: My friend sent me this question which resolved my problem. 来源: https://stackoverflow.com/questions/9411306/elmah-how-to-log-http-request-body-and-http-request-header-with-error-log

Using Spark or Razor viewengine with OpenRasta

两盒软妹~` 提交于 2019-12-10 16:45:00
问题 has anyone used Spark or Razor view engine with OpenRasta framework? or any suggestion on the view engine other than the build in WebForms ? 回答1: There is Spark and Razor ViewEngine support for OpenRasta available at https://github.com/openrasta/openrasta-codecs-razor https://github.com/openrasta/openrasta-codecs-spark You will probably have to build from source from these locations. 来源: https://stackoverflow.com/questions/5863585/using-spark-or-razor-viewengine-with-openrasta

PKI authentication for OpenRasta

断了今生、忘了曾经 提交于 2019-12-08 05:26:57
问题 I'm looking at implementing PKI authentication ( 2 way SSL requiring x.509 certificates) for OpenRasta service. Any ideas on how to go about this? Thanks 回答1: I assume that you're using the HttpListener hosting. To enable SSL / Client certifiacates, those settings are set by httpcfg. You can find some information at http://msdn.microsoft.com/en-us/library/ms733791.aspx. More specifically, you should be able to enable SSL with client certificates using httpcfg set ssl -i 0.0.0.0:8012 -h

DataContractJsonSerializer Date Serialization

[亡魂溺海] 提交于 2019-12-07 10:41:02
问题 Is there a way to change how the DataContractJsonSerializer serializes dates? Currently, it'll convert a date to something like: { "date": "/Date(1260597600000-0600)/" } I want to convert it into human readable date format. I am building a RestApi using openrasta framework. Can i write OperationInterceptors which will at some stage before serialization/deserialization convert JSON datetime format to something which is human readable?Or is there any other way to do it? 回答1: Use