2013-06-27 75 views
1

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

这是详细的错误信息。

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 

任何帮助,将不胜感激。

+0

有太多的信息给出任何有用的反馈。你有什么尝试?你遵循什么tutotial? – allprog

+0

[访问IIS中的.svc文件时HTTP 404的可能重复](http://stackoverflow.com/questions/2609377/http-404-when-accessing-svc-file-in-iis) – quetzalcoatl

+0

当前我正在使用此WCF REST应用程序在IIS 7中。现在我已将它移至Windows 8 PC中的IIS8。现在这不起作用,并抛出上述错误信息。 –

回答

4

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

此外,请重新检查服务是否已启动并正在运行。连接到www服务器,并通过本地主机检查它不是ip.com

我不是专家,但从你提供的片段来看,它似乎是WCF服务,Handler: StaticFile似乎很奇怪。看起来IIS似乎把你的请求误解为一个StaticFile(一个从磁盘读取的资源,只是传递而没有进一步的处理),这对我来说似乎是完全错误的。

您可能尚未正确安装该服务,或者使url映射和/或处理程序混乱,或者甚至可能没有正确安装NET/ASP框架。您先安装了什么? .Net或IIS?

检查类似questios,还有很多。例如:

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

HTTP 404 when accessing .svc file in IIS

0

我不得不启用在.NET框架4.5高级服务的HTTP激活> WCF服务(在Windows上运行2012)和IISReset后它工作正常。

相关问题