在Vista IIS 7上寫了一個WCF服務,正想用http: //localhost/MyWebApp/MyWCF.svc看一下有無成功執行,結果傳回以下錯誤:

HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

查了一下,在IIS7上跑WCF要動點手腳,得執行ServiceModelReg.exe註冊WCF: (注意要用Admin身份跑,最簡單的方法是 開始->執行->cmd,然後ctrl-shift-Enter,就會以Admin身份開始命令視窗)

C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation>servicemodelreg -i

藥到病除!


Comments

Be the first to post a comment

Post a comment