HTTP错误404.0 - 访问SVC服务时未找到

时间:2013-06-27 10:01:25

标签: iis-8

我有一个REST服务应用程序,它托管在Windows 8 PC的IIS 8中。当我请求服务时,我收到如下错误... HTTP错误404.0 - 未找到。

以下是详细的错误消息。

HTTP Error 404.0 - Not Found

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Most likely causes:
•The directory or file specified does not exist on the Web server.
•The URL contains a typographical error.
•A custom filter or module, such as URLScan, restricts access to the file.

Things you can try:
•Create the content on the Web server.
•Review the browser URL.
•Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click here. 

Detailed Error Information:
Module   IIS Web Core 
Notification   MapRequestHandler 
Handler   StaticFile 
Error Code   0x80070002 

Requested URL   http://IP.com/Wining/RService.svc/general 

Physical Path   C:\inetpub\wwwroot\Wining\RService.svc\general 

Logon Method   Anonymous 

Logon User   Anonymous

对此的任何帮助将不胜感激。

2 个答案:

答案 0 :(得分:4)

有无数可能的原因。通常,找不到给定URL的目标资源,因此可能只是丢失,配置错误,未启动等。首先 - 检查服务器日志,它们通常包含有关该问题的更详细信息。

另外,请仔细检查该服务是否正常运行。连接到www服务器并通过localhost而不是ip.com进行检查。

我不是专家,但从您提供的代码段来看,它似乎是WCF服务,Handler: StaticFile似乎很奇怪。似乎IIS将您的请求误解为静态文件(从磁盘读取的资源,只是传递而没有任何进一步的处理),这对我来说似乎完全错误。

您可能没有正确安装服务,或者网页映射和/或处理程序搞砸了,或者您甚至可能没有正确安装NET / ASP框架..您先安装了什么? .Net还是IIS?

检查类似的问题,有很多..例如:

WCF on IIS8; *.svc handler mapping doesn't work

HTTP 404 when accessing .svc file in IIS

答案 1 :(得分:1)

我必须在.NET Framework 4.5高级服务中启用HTTP激活> WCF服务(在WIndows 2012上运行)和IISReset之后运行良好。

相关问题