2017-11-23 5 views
0

私はpostman、 を使用してページOnPostAsync(apiコントローラではない)への呼び出しをテストしようとしていますが、.netコア2ページのデフォルトプロジェクトテンプレートを作成しました。私はいつも400の悪い要求を得て、ヘッダーなどで遊ぼうとしましたが成功しませんでした。
これがうまくいくと私の目標はエンドツーエンド/負荷テストを行うことですtest .net core 2 page postman return 400 bad requestを使用しました

ありがとう!

enter image description here enter image description here

enter image description here

enter image description here

答えて

1

答えは[IgnoreAntiforgeryToken(注文= 1001)] PageModel

enter image description here

使用 IgnoreAntiforgeryTokenを無効にすることが回避策をだ https://github.com/aspnet/Mvc/issues/7012を発見しました。
+1

魅力のように動作します、ありがとう。 –

関連する問題