我已经创建了运行Suave.IO应用程序的基本Websharper UI.Next客户端服务器。我在OSX Yosemite上使用最新的Xamarin。我在安装模板项目后更新了所有nuget包,然后运行它。
我已经启动了应用程序,并将日志记录级别更改为详细,我得到了
➜ Release mono bookman.exe
[V] 2015-12-01T11:56:06.8822300Z: initialising BufferManager with 827392 bytes [Suave.Socket.BufferManager]
[I] 2015-12-01T11:56:06.9302920Z: listener started in 70.389 ms with binding 127.0.0.1:8080 [Suave.Tcp.tcpIpServer]
[V] 2015-12-01T11:56:15.4114760Z: 127.0.0.1 connected, total: 1 clients [Suave.Tcp.job]
[V] 2015-12-01T11:56:15.4164780Z: reserving buffer: 811008, free count: 99 [Suave.Tcp.job] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:15.4225250Z: -> processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:15.4235180Z: reading first line of request [Suave.Web.processRequest]
[V] 2015-12-01T11:56:15.4376480Z: reserving buffer: 802816, free count: 98 [Suave.Web.readMoreData] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:15.4582650Z: reading headers [Suave.Web.processRequest]
[V] 2015-12-01T11:56:15.4621430Z: freeing buffer: 802816, free count: 99 [Suave.Web.split] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:15.5131730Z: parsing post data [Suave.Web.processRequest]
[V] 2015-12-01T11:56:15.5181060Z: <- processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:15.6607220Z: yielding to OWIN middleware [Suave.Owin]
[V] 2015-12-01T11:56:16.0019320Z: suave back in control [Suave.Owin]
[V] 2015-12-01T11:56:16.0116030Z: writing preamble [Suave.Owin]
[V] 2015-12-01T11:56:16.0211620Z: writing body [Suave.Owin]
[V] 2015-12-01T11:56:16.0303130Z: 'Connection: keep-alive' recurse [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.0304930Z: -> processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.0305660Z: reading first line of request [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.0307270Z: reserving buffer: 802816, free count: 98 [Suave.Web.readMoreData] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1559600Z: 127.0.0.1 connected, total: 2 clients [Suave.Tcp.job]
[V] 2015-12-01T11:56:16.1561280Z: reserving buffer: 794624, free count: 97 [Suave.Tcp.job] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1561380Z: 127.0.0.1 connected, total: 3 clients [Suave.Tcp.job]
[V] 2015-12-01T11:56:16.1562290Z: -> processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.1563940Z: reading first line of request [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1563040Z: reserving buffer: 786432, free count: 96 [Suave.Tcp.job] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1564960Z: reserving buffer: 778240, free count: 95 [Suave.Web.readMoreData] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1565750Z: -> processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.1567340Z: reading first line of request [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1568210Z: reserving buffer: 770048, free count: 94 [Suave.Web.readMoreData] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1570000Z: 127.0.0.1 connected, total: 4 clients [Suave.Tcp.job]
[V] 2015-12-01T11:56:16.1570010Z: reading headers [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1570910Z: reserving buffer: 761856, free count: 93 [Suave.Tcp.job] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1572860Z: -> processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.1573510Z: freeing buffer: 802816, free count: 94 [Suave.Web.split] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1571330Z: reading headers [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1574930Z: reading headers [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1573700Z: reading first line of request [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1577420Z: 127.0.0.1 connected, total: 6 clients [Suave.Tcp.job]
[V] 2015-12-01T11:56:16.1577780Z: reserving buffer: 770048, free count: 95 [Suave.Web.readMoreData] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1579350Z: reserving buffer: 778240, free count: 94 [Suave.Tcp.job] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1578170Z: freeing buffer: 778240, free count: 95 [Suave.Web.split] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1573460Z: 127.0.0.1 connected, total: 5 clients [Suave.Tcp.job]
[V] 2015-12-01T11:56:16.1579710Z: parsing post data [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1582570Z: parsing post data [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1580370Z: -> processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.1584480Z: reading first line of request [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1582100Z: reserving buffer: 802816, free count: 93 [Suave.Tcp.job] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1583410Z: <- processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.1585490Z: reserving buffer: 753664, free count: 92 [Suave.Web.readMoreData] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1579110Z: freeing buffer: 770048, free count: 96 [Suave.Web.split] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1580860Z: reading headers [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1582740Z: <- processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.1586270Z: -> processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.1590750Z: parsing post data [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1589400Z: reading headers [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1591580Z: freeing buffer: 770048, free count: 93 [Suave.Web.split] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1591550Z: reading first line of request [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1595200Z: parsing post data [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1592410Z: <- processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.1595470Z: reserving buffer: 753664, free count: 93 [Suave.Web.readMoreData] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1596290Z: <- processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.1594700Z: freeing buffer: 753664, free count: 94 [Suave.Web.split] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1601570Z: reading headers [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1601740Z: parsing post data [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1603330Z: <- processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.1604170Z: freeing buffer: 753664, free count: 94 [Suave.Web.split] [Suave.Socket.BufferManager]
[V] 2015-12-01T11:56:16.1606270Z: parsing post data [Suave.Web.processRequest]
[V] 2015-12-01T11:56:16.1607050Z: <- processor [Suave.Web.httpLoop.loop]
[V] 2015-12-01T11:56:16.1873560Z: failed to find resource by key '/Users/bradphelan/Projects/bookman/bookman/Scripts/WebSharper/bookman.min.js' [Suave.Http.ServeResource.resource]
[V] 2015-12-01T11:56:16.1874960Z: failed to find resource by key '/Users/bradphelan/Projects/bookman/bookman/Scripts/WebSharper/WebSharper.Core.JavaScript/Runtime.min.js' [Suave.Http.ServeResource.resource]
[V] 2015-12-01T11:56:16.1873840Z: failed to find resource by key '/Users/bradphelan/Projects/bookman/bookman/Scripts/WebSharper/WebSharper.Web.min.js' [Suave.Http.ServeResource.resource]
[V] 2015-12-01T11:56:16.1873750Z: failed to find resource by key '/Users/bradphelan/Projects/bookman/bookman/Scripts/WebSharper/WebSharper.Main.min.js' [Suave.Http.ServeResource.resource]
[V] 2015-12-01T11:56:16.1875140Z: failed to find resource by key '/Users/bradphelan/Projects/bookman/bookman/Scripts/WebSharper/WebSharper.Collections.min.js' [Suave.Http.ServeResource.resource]
[V] 2015-12-01T11:56:16.1874390Z: failed to find resource by key '/Users/bradphelan/Projects/bookman/bookman/Scripts/WebSharper/WebSharper.UI.Next.min.js' [Suave.Http.ServeResource.resource]
[V] 2015-12-01T11:56:16.1880110Z: yielding to OWIN middleware [Suave.Owin]
[V] 2015-12-01T11:56:16.1880580Z: yielding to OWIN middleware [Suave.Owin]
[V] 2015-12-01T11:56:16.1881790Z: yielding to OWIN middleware [Suave.Owin]
[V] 2015-12-01T11:56:16.1882790Z: yielding to OWIN middleware [Suave.Owin]
[V] 2015-12-01T11:56:16.1883520Z: yielding to OWIN middleware [Suave.Owin]
[V] 2015-12-01T11:56:16.1879490Z: yielding to OWIN middleware [Suave.Owin]
关键日志行是
V] 2015-12-01T11:56:16.1873560Z: failed to find resource by key '/Users/bradphelan/Projects/bookman/bookman/Scripts/WebSharper/bookman.min.js' [Suave.Http.ServeResource.resource]
[V] 2015-12-01T11:56:16.1874960Z: failed to find resource by key '/Users/bradphelan/Projects/bookman/bookman/Scripts/WebSharper/WebSharper.Core.JavaScript/Runtime.min.js' [Suave.Http.ServeResource.resource]
[V] 2015-12-01T11:56:16.1873840Z: failed to find resource by key '/Users/bradphelan/Projects/bookman/bookman/Scripts/WebSharper/WebSharper.Web.min.js' [Suave.Http.ServeResource.resource]
[V] 2015-12-01T11:56:16.1873750Z: failed to find resource by key '/Users/bradphelan/Projects/bookman/bookman/Scripts/WebSharper/WebSharper.Main.min.js' [Suave.Http.ServeResource.resource]
[V] 2015-12-01T11:56:16.1875140Z: failed to find resource by key '/Users/bradphelan/Projects/bookman/bookman/Scripts/WebSharper/WebSharper.Collections.min.js' [Suave.Http.ServeResource.resource]
[V] 2015-12-01T11:56:16.1874390Z: failed to find resource by key '/Users/bradphelan/Projects/bookman/bookman/Scripts/WebSharper/WebSharper.UI.Next.min.js' [Suave.Http.ServeResource.resource]
javascripts没有加载。这也可以在浏览器中看到。
答案 0 :(得分:1)
您需要在piwin
之前Files.browseHome
转向文件服务器。