最近一直再学习asp.net 相关的东西,主要是为前端app提供一个webapi接口。在使用iis调试程序时出现HTTP Error 500.24 - Internal Server Error错误,搞了好久才最终解决。

1.在项目中增加web.config配置文件

2.将配置文件改为如下内容
xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
</configuration>
再次启动调试程序就搞定啦!