2017-11-01 4 views
0

これは1年おきに変化するようです。401でエラーメッセージを返すには?

var msg = new HttpResponseMessage(HttpStatusCode.Unauthorized) { ReasonPhrase = "Terms not accepted." }; 

throw new HttpResponseException(msg); 

ここでの問題は、フレームワークはHttpResponseExceptionが何であるかを知らないということです。

だから、今何をしていますか?

答えて

0

ハレルヤ!

return StatusCode(401, "Hello World!"); 
関連する問題