WCF+IIS HTTP Error 404.17 – Not Found, The requested content appears to be script and will not be ..

本文介绍了在使用WCF与IIS时遇到的404.17错误及其解决方案。该错误提示为The requested content appears to be script and will not be served by the static file handler。解决方法涉及调整ISAPI版本,通过重新注册2.0版本的ISAPI来确保系统能够正确解析.svc文件。

在使用WCF+IIS的时候碰到的一个很诡异的问题。

操作系统:windows 2008  server 64位

在访问.svc文件时,发生如下错误:

错误:HTTP Error 404.17 – Not Found, The requested content appears to be script and will not be served by the static file handler

不少人碰到这种问题,解决方案各不一样。

从这个错误报告看,似乎是系统无法解析svc文件,可是这个iis已经安装了所有必要的组件。

这片文章提供了一个解决方案:

http://udonmez.wordpress.com/2011/02/10/http-error-404-17-not-found-the-requested-content-appears-to-be-script-and-will-not-be-served-by-the-static-file-handler/

 

原因:可能是iis使用的isapi版本太高,是4.0的,而所开发的系统用的可能是2.0的。重新注册2.0的isapi即可。

即运行如下命令

1.   cmd

2.   cd  C:\Windows\Microsoft.NET\Framework64\v3.0\Windows Communication Foundation

3.   ServiceModelReg.exe -i

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值