404 WCF服务错误疑难解答

404 WCF服务错误疑难解答,wcf,iis-7,Wcf,Iis 7,我最近将ASP.Net应用程序从.NETFramework 3.5升级到了4.0。该应用程序包括一个WCF服务,升级后返回404错误 错误消息如下: Server Error in '/' Application. -------------------------------------------------------------------------------- The resource cannot be found. Description: HTTP 404. The re

我最近将ASP.Net应用程序从.NETFramework 3.5升级到了4.0。该应用程序包括一个WCF服务,升级后返回404错误

错误消息如下:

Server Error in '/' Application.
--------------------------------------------------------------------------------

The resource cannot be found. 
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

Requested URL: /ws/ProviderService.svc


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 
web.config已被删除

<error statusCode="404" redirect="Common/Pages/404b.htm"/>
它应该将404重定向到自定义页面。如果我试图访问一个不存在的.asmx服务,那么它会正确地重定向到404b.htm页面

看起来.NETFramework4.0没有处理这些问题,但不知怎么的,.NETFramework2.0正在处理这些问题

该站点位于IIS7和Windows Server 2008上


有什么想法吗?

即使是.Net 4.0,我相信asp.Net说的是Net framework 2.0,web.config中customerror标记的设置是什么

确保将其设置为“关闭”,而不仅仅是“远程”