Nancy is a lightweight web framework for the .Net platform, inspired by Sinatra. Nancy aims to deliver a low ceremony approach to building light, fast web applications.

learn more… | top users | synonyms

1
vote
0answers
6 views

Nancy model binding not working in Chrome, IE

I have been having this issue in one of my applications and have stripped it down and set up a small test environment in which the problem still occurs. I am posting the following object (JSON) { ...
0
votes
0answers
11 views

Override OPTIONS response in NancyFX / Visual Studio Web Server

I've build a RESTful web service using NancyFX which I'm now trying to POST to from a separate domain. Of course when I do that, I see a failed OPTIONS message in the console because this is a Cross ...
0
votes
1answer
34 views

Unit testing JSON ModelBinding in Nancy

I am trying to test JSON model binding in NancyFx. The request works when tested in the browser, but I cannot get the unit test to pass. When I debug the test, I find that the model returned is null ...
0
votes
1answer
29 views

How do I forward/redirect all requests from HTTP to HTTPS in NancyFX SelfHost?

I'm trying to get it so that any requests made to: http://<myserver>:1234 are redirected to: https://<myserver>:1234 I've tried using "this.RequiresHttps()" in modules, but when I hit ...
1
vote
3answers
122 views

Accessing dynamic property in F#

I was trying to access dynamic property in Nancy. In Nancy if pass parameter in query it comes as dynamic property. How can I access that. There are many discussion / question about this but every ...
2
votes
2answers
135 views

Understanding C# in context of F# for this keyword

I am trying Nancy with F#. It pretty cool but I couldn't get it few things in F#. First I ll write down both code. Here is code of C# public class HomeModule : NancyModule { public HomeModule() ...
0
votes
1answer
43 views

Implementing a custom FormsAuthenticationProvider using Owin, Katana, and Nancy

I am working on implementing a custom FormsAuthenticationProvider and I'm getting a middleware conversion error. No conversion available between System.Func`2[System.Collections.Generic.IDictionary`2 ...
2
votes
1answer
55 views

Nancy: how do I capture all requests irrespective of verb or path

I want to use Nancy with the default routing, as it's clean and works well, however I want an option to log all incoming requests to the console (I'm using Nancy's self-hosting module) irrespective of ...
0
votes
1answer
47 views

Link to other page (à la MVC Html.ActionLink)

I'm using ASP.NET-hosted Nancy with the Razor view engine. On my dev machine, the application runs directly in the root virtual directory, but on our CI, we deploy the application to a subfolder: ...
0
votes
1answer
20 views

How to have optional route segment for file name in Nancy

I want to make a route that will match on a folder path as well as one ending with a file name. So it should match all three of these: /foo /foo/ /foo/default.asp I tried these and other similar ...
1
vote
0answers
65 views

OWIN-hosted Nancy Module Calling RequiresAuthentication sends back 401

I have a Nancy module like this. public class HomeModule : NancyModule { public HomeModule() { this.RequiresAuthentication(); var context = this.Context; // this is null ...
1
vote
0answers
64 views

How to handle subdomains in NancyFX routes

Really liking the simplicity and the power of the NancyFX framework, but I ran into something which I cannot find a good solution for; how to route based on subdomains? For example; I want to define ...
1
vote
2answers
63 views

How to serialize DateTimeOffset as JSON in NancyFX?

I'm attempting to return some JSON from my Nancy application, using the default JSON serializer. I've got the following DTO class: class Event { public DateTimeOffset Timestamp { get; set; } ...
2
votes
1answer
41 views

Does NancyFX have an equivalent to HttpRequest.ServerVariables holding X-Forwarded-For values?

I'd like to determine whether there is an X_FORWARDED_FOR value on the request made to my NancyFX handler. In MVC, this is held in the ServerVariables named collection of the HttpRequest. Where ...
2
votes
1answer
48 views

How do I update database without TryUpdateModel()

I was using MVC4 all the time and I updated my entities to database simply by calling TryUpdateModel(); Example (MVC4) public ActionResult Edit(User user) { var userDb = _db.Users.Single(x => ...

1 2 3 4 5 15
15 30 50 per page