我通過github安裝了NancyFX 0.23.2源代碼,並在Windows 7 x64上安裝了VS2013 Pro。我可以建立很好,但是當我通過GenericFileRespose返回什麼,我得到:Nancy自己託管HttpListenerException:「參數不正確」
A first chance exception of type 'System.Net.HttpListenerException' occurred in System.dll
---
System.Net.HttpListenerException (0x80004005): The parameter is incorrect
at System.Net.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
at Nancy.Responses.GenericFileResponse.<>c__DisplayClass1.<GetFileContent>b__0(Stream stream) in h:\home\projects\nancy\0.23.2\Nancy\src\Nancy\Responses\GenericFileResponse.cs:line 82
at Nancy.Hosting.Self.NancyHost.OutputWithDefaultTransferEncoding(Response nancyResponse, HttpListenerResponse response) in h:\home\projects\nancy\0.23.2\Nancy\src\Nancy.Hosting.Self\NancyHost.cs:line 320
at Nancy.Hosting.Self.NancyHost.ConvertNancyResponseToResponse(Response nancyResponse,
...
如果我鏈接,而是通過的NuGet檢索南希的二進制文件,我的輸出是不錯,但我有沒有調試信息南希。
我啓動了南希自己的主機演示程序,它似乎工作正常,但如果我能說出我的項目有什麼不同,就會跳動。一切都是爲「任何CPU」而構建的。 Nancy是用目標.net 4.0客戶端配置文件構建的,Nancy.Hosting.Self目標是.net 4.0完整版,我的類庫和我的控制檯應用程序啓動了NancyHost。
任何瞭解將不勝感激。