webapi 跨域的 问题

用 Microsoft.AspNet.WebApi.Cors实现WEBAPI的跨域,跨域似乎是可以了,但是引发了另一个错误,如下:

处理 HTTP 请求导致了异常。请参见此异常的 "Response" 属性返回的 HTTP 响应,以了解详细信息。
StackTrace: 在 System.Web.Http.ModelBinding.FormatterParameterBinding.ReadContentAsync(HttpRequestMessage request, Type type, IEnumerable`1 formatters, IFormatterLogger formatterLogger, CancellationToken cancellationToken)
在 System.Web.Http.ModelBinding.FormatterParameterBinding.ReadContentAsync(HttpRequestMessage request, Type type, IEnumerable`1 formatters, IFormatterLogger formatterLogger)
在 System.Web.Http.ModelBinding.FormatterParameterBinding.<ExecuteBindingAsyncCore>d__18.MoveNext()

似乎是值绑定的问题!


烙印99
浏览 1386回答 1
1回答

ABOUTYOU

请求时有没有设置&nbsp;Content-Type: application/json&nbsp;?
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript