2013-06-27 94 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後它工作正常。

相關問題