且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

IIS7 Request format is unrecognized.

更新时间:2022-09-18 20:14:25

早上同事在安装程序的时候一直报错让我帮忙查一下原因,最后发现是一个网站无法打开。错误报错如下:

 

 

错误1:The Web server is configured to not list the contents of thisdirectory.

 

解决办法:打开IIS控制台兵器启用Directory browsing

 

IIS7 Request format is unrecognized.

 

错误2Request format is unrecognized.

 

解决办法:

 

找到Web.config文件,增加下面的信息:

 

<configuration>
    <system.web>
    <webServices>
        <protocols>
            <add name="HttpGet"/>
            <add name="HttpPost"/>
        </protocols>
    </webServices>
    </system.web>
</configuration>

 

原因:GET和 POST 在ASP.NET2.0或者之上的版本是默认Disabled,需要更改Web.config启用。


本文转自 lzf328 51CTO博客,原文链接:http://blog.51cto.com/lzf328/1044844