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