方法一:
找到Global.asax文件,在Application_Start()方法中添加一句:
GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear();