マイセットアップ: クライアント(HTTP:8080)nginxの(のFastCGI:9000)のfastcgi-モノサーバーNginx + FastCGI + Mono WebAPI 2がスローArgumentNullException:値にnullを設定することはできません。パラメータ名:パス
私はASP.NET MVC 4をホストしますアプリケーションは、完全にモノ4とfastcgi-mono-server4
とUbuntuで、等WebAPIの2つのコントローラ、構成で構築されたが、WebAPIのルートのためには400
返し:
System.ArgumentNullException
Value cannot be null.
Parameter name: path
Description: HTTP 400.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): mscorlib.
Exception stack trace:
at System.IO.DirectoryInfo.CheckPath (System.String path) [0x00006] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
at System.IO.DirectoryInfo..ctor (System.String path, System.Boolean simpleOriginalPath) [0x00006] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
at System.IO.DirectoryInfo..ctor (System.String path) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:.ctor (string)
at Mono.WebServer.FastCgi.WorkerRequest.GetFilePath() [0x00035] in <a872d12009ac4a668f0d504d764f1c44>:0
at Mono.WebServer.MonoWorkerRequest.GetFilePathTranslated() [0x00001] in <5b4128956e344d60b82a5fd7012fd8a1>:0
at Mono.WebServer.MonoWorkerRequest.AssertFileAccessible() [0x00010] in <5b4128956e344d60b82a5fd7012fd8a1>:0
at Mono.WebServer.MonoWorkerRequest.ProcessRequest() [0x0000b] in <5b4128956e344d60b82a5fd7012fd8a1>:0
私の開発マシンでは、xsp4
とMonoDevelop "run"ボタンの両方でうまく動作します。 fastcgi-mono-server4
を試してみませんでしたが、それが関係していると思うなら私はします。
私は上記の動作は、WebAPIルートに一致するURLに対してのみ発生すると述べています。 /api/products
は設定作業を意味し、環境と関係があると思います。
次のように私はfastcgi-mono-server
を開始しました:MONO_OPTIONS=--trace=E:System.Exception fastcgi-mono-server4 /appconfigdir=/etc/mono/fastcgi /socket=tcp:127.0.0.1:9000
と打つWebAPIのがURLのときには、この出力:
[0x7f8276459700:] EXCEPTION handling: System.ArgumentNullException: Value cannot be null.
Parameter name: path
私のコードは、任意のIO、データベースのみを行いません(しかし、我々はまだかなりそこにいません)。上記のように、WebAPIルートに一致するURLに対してのみ動作します。 /api/products
は設定作業を意味し、環境と関係があると思います。