1
我目前在我的树莓派上运行Mono JIT编译器2.10.8.1版(Debian 2.10.8.1-5)。我从master分支编译了nancyfx monorelease配置。Nancyfx执行路线但不返回结果。 (运行在Raspberry Pi Mono上)
应用程序开始预期
Nancy now listening - navigating to http://localhost:8888/nancy/.
Press enter to stop
我然后运行测试如下
[email protected] ~ $ wget http://localhost:8888/nancy/
--2013-04-13 06:39:12-- http://localhost:8888/nancy/
Resolving localhost (localhost)... 127.0.0.1, ::1
Connecting to localhost (localhost)|127.0.0.1|:8888... connected.
HTTP request sent, awaiting response...
这将永远不会完成。它只是坐在那里。
我已经添加了一些日志记录,我可以看到它处理模块上的路由动作,但它似乎永远不会返回http响应。
有没有人见过这个?有没有办法添加更多的异常捕获?
以下几点什么都没有透露。
public class LoggingErrorHandler : IErrorHandler
{
private readonly ILog _logger = LogManager.GetLogger(typeof(LoggingErrorHandler));
public bool HandlesStatusCode(HttpStatusCode statusCode)
{
return statusCode == HttpStatusCode.InternalServerError;
}
public bool HandlesStatusCode(HttpStatusCode statusCode, NancyContext context)
{
return statusCode == HttpStatusCode.InternalServerError;
}
public void Handle(HttpStatusCode statusCode, NancyContext context)
{
object errorObject;
context.Items.TryGetValue(NancyEngine.ERROR_EXCEPTION, out errorObject);
var error = errorObject as Exception;
_logger.Error("Unhandled error", error);
}
}
任何想法?
谢谢
我有同样的问题,你是否得到这个工作? – dbones