F# ionide websharperserverclient - 如何运行

标签 f# visual-studio-code websharper ionide websharper.ui.next

我在运行 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/httpModulessystem.webServer/modules )。
  • 删除对 WebSharper.Owin 的 NuGet 依赖项和 Microsoft.Owin.Host.SystemWeb (并确保从您的bin 文件夹中删除相应的dll)。
  • 删除或注释掉 Startup.fs .
  • 关于F# ionide websharperserverclient - 如何运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40190505/

    相关文章:

    f# - 在 XML 文档中嵌入图像

    f# - 什么是主导?是 F# 类型签名吗?

    构造函数中的 F# 引号、数组和自标识符

    linux - 如何在 Linux 上将 F# 与单声道一起使用?

    c# - 在 F# 中处理资源清理的功能方法

    visual-studio-code - "Go to file"使用 VSCode,而不是 goToSymbol

    flutter - 我的括号和圆括号开始在 VS Code 中显示为多色

    javascript - VSCode 如果在省略大括号时缩进

    f# - 在 WebSharper 中显示移动页面

    templates - websharper - 使用具有两种方式绑定(bind)的 html 模板