gpt4 book ai didi

asp.net-mvc-4 - 无法识别 ASP.NET MVC AddJsonpFormatter

转载 作者:行者123 更新时间:2023-12-04 05:44:12 25 4
gpt4 key购买 nike

我在 ASP.Net MVC 项目中使用 VS2013。我想添加 json 格式:

https://github.com/WebApiContrib/WebApiContrib.Formatting.Jsonp

我已经使用包管理器控制台安装了包:

Install-Package WebApiContrib.Formatting.Jsonp

但在 global.asax 中我无法添加代码:

GlobalConfiguration.Configuration.AddJsonpFormatter();

我收到以下错误:

'System.Web.Http.HttpConfiguration' does not contain a definition for 'AddJsonpFormatter' and no extension method 'AddJsonpFormatter' accepting a first argument of type 'System.Web.Http.HttpConfiguration' could be found (are you missing a using directive or an assembly reference?) D:\Proyectos\laive\laive.trade\CC\Web\Global.asax.cs 18 47 Web

先谢谢你,保罗。

最佳答案

您需要具备以下条件:

使用 WebApiContrib.Formatting.Jsonp;

关于asp.net-mvc-4 - 无法识别 ASP.NET MVC AddJsonpFormatter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25396778/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com