4
我只是想確保在這裏沒有問題。是否有人知道是什麼原因.NET核心API請求與支持的文件類型不匹配
2017-03-17 07:59:17.5838|1|Microsoft.AspNetCore.Hosting.Internal.WebHost|INFO|Request starting HTTP/1.1 GET http://192.168.20.57:8081/hardware/configuration/active application/json
2017-03-17 07:59:17.5868|4|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|DEBUG|The request path /hardware/configuration/active does not match a supported file type
我只暴露了Kestrel的Web API(沒有IISIntegration)。
請求頭中包含
GET /hardware/configuration/active HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json
定義 [Produces("application/json")]
明確地在我的控制器沒有影響。