Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
F# 重定向在温文尔雅中似乎不起作用_F#_Suave - Fatal编程技术网

F# 重定向在温文尔雅中似乎不起作用

F# 重定向在温文尔雅中似乎不起作用,f#,suave,F#,Suave,我尝试重定向到一个index.html页面,路径为“/hello”>>=redirect“index.html”,它不断给出错误“没有收到数据”ERR\u EMPTY\u响应。我认为在Suave中重定向没有任何问题。以下对我来说很好: #r @"packages/Suave/lib/net40/Suave.dll" open Suave open Suave.Web open Suave.Http open Suave.Http.Applicatives choose [ path "/i

我尝试重定向到一个index.html页面,路径为“/hello”>>=redirect“index.html”,它不断给出错误“没有收到数据”ERR\u EMPTY\u响应。

我认为在Suave中重定向没有任何问题。以下对我来说很好:

#r @"packages/Suave/lib/net40/Suave.dll"
open Suave
open Suave.Web
open Suave.Http
open Suave.Http.Applicatives

choose
  [ path "/index.html" >>= Successful.OK "Hello" 
    path "/redir" >>= Redirection.redirect "/index.html" ]
|> startWebServer defaultConfig

正如Fyodor在评论中提到的,我会检查
index.html
的处理程序是否工作正常。您还可以在Fiddler或Chrome开发工具中检查返回的重定向头。

是否还为“index.cshtml”定义了处理程序?