当前位置: 移动技术网 > IT编程>开发语言>.net > 新建WebAPI项目时遇到的问题

新建WebAPI项目时遇到的问题

2018年12月03日  | 移动技术网IT编程  | 我要评论

1   处理程序“extensionlessurlhandler-integrated-4.0”在其模块列表中有一个错误模块“managedpipelinehandler”

 

以管理员运行下面的命令注册:

32位机器:

c:\windows\microsoft.net\framework\v4.0.30319\aspnet_regiis.exe -i

64位机器:

c:\windows\microsoft.net\framework64\v4.0.30319\aspnet_regiis.exe -i

2 http错误 500.19 - internet server error 无法访问请求的页面,因为该页的相关配置数据无效

win+r 运行 c:\windows\microsoft.net\framework\v2.0.50727\aspnet_regiis.exe -i 重新注册一下asp.net

 

3 webapi “objectcontent`1”类型未能序列化内容类型“application/xml; charset=utf-8”的响应正文。

在webapiconfig中的register方法中添加代码:

1 globalconfiguration.configuration.formatters.xmlformatter.supportedmediatypes.clear();

 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网