我在运行 websharperserverclient
时遇到问题来自 ionide 项目生成器的模板应用程序,在网上找不到任何信息如何操作 - 我得到的最接近的是 this question - 我实际上尝试使用 xsp4
运行它在项目文件夹中(Web.config
文件所在的位置),但每次都得到一个 404(附上的屏幕截图:xsp4 error)。当然,在启动 xsp 之前,我会运行 ./build.sh
(或 FAKE build
)脚本,它没有错误地完成。我对 websharpersuave
没有任何问题和 websharperspa
项目模板(第二个以 xsp4
运行,效果非常好)。
编辑
文本形式的错误消息:
System.Web.HttpException
The resource cannot be found.Description: HTTP 404.The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Details: Requested URL: /
Exception stack trace:
at System.Web.StaticFileHandler.ProcessRequest (System.Web.HttpContext context) <0x4202aa80 + 0x00733> in <filename unknown>:0 at System.Web.DefaultHttpHandler.BeginProcessRequest (System.Web.HttpContext context, System.AsyncCallback callback, System.Object state) <0x4202a400 + 0x00153> in <filename unknown>:0 at System.Web.HttpApplication+<Pipeline>c__Iterator1.MoveNext () <0x42012000 + 0x04416> in <filename unknown>:0 at System.Web.HttpApplication.Tick () <0x42010800 + 0x00057> in <filename unknown>:0
最佳答案
是的,使用 xsp 运行 OWIN 模块似乎存在问题,我正在调查。同时,您可以通过执行以下操作切换到使用 WebSharper 的 HttpModules:
Web.config
中指示与 HttpModule 相关的节点(即节点 system.web/httpModules
和 system.webServer/modules
)。 WebSharper.Owin
的 NuGet 依赖项和 Microsoft.Owin.Host.SystemWeb
(并确保从您的bin
文件夹中删除相应的dll)。 Startup.fs
. 关于F# ionide websharperserverclient - 如何运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40190505/