locked
wcf - error 404 file cannot be found when trying to browse the *.svc file RRS feed

  • Question

  • Hi all,

    I am getting "file not found" error when tring to browse to the *.svc file of my service. i've tried almost everything including reinstalling the iis and using the CleanIISScriptsMap tool.
    I am trying to run it on a windows server 2003 with .net framework 3.5 (no visual studio on this machine)
    I've added IIS_WPG, Network Service and Asp.Net groups with full permissions to the folder of my service. 
    This service works fine on other machines.
    Does anybody have an idea?

    Thanks.
    loofyan
    Tuesday, November 11, 2008 6:45 PM

Answers

  • I  have installed .net framework 3.5 sp1 and it solved the problem.

    Thanks for all the answerers!
    loofyan
    • Marked as answer by loofyan Wednesday, November 12, 2008 12:51 PM
    • Unmarked as answer by loofyan Wednesday, November 12, 2008 12:51 PM
    • Unmarked as answer by loofyan Wednesday, November 12, 2008 12:51 PM
    • Unmarked as answer by loofyan Wednesday, November 12, 2008 12:51 PM
    • Unmarked as answer by loofyan Wednesday, November 12, 2008 12:51 PM
    • Marked as answer by Dinesh Ravva - MSFT Friday, November 21, 2008 8:27 AM
    Wednesday, November 12, 2008 11:41 AM

All replies

  • If you place an html file in the same directory can you browse to it?

    --Steve Barbour
    Tuesday, November 11, 2008 7:02 PM
  • Try the following:

    ( I think I already answered you in another forum ;-) 

    - Try to upload any normal ASP.NET 2.0 web site and see if you can access the .aspx
    - Try to build a sample WCF service as executable (using self hosting) and check if it works
    - In inetmgr press "properties" oj your site, go to the "home directory" tab and press the "configuration" button. In the screen that opens in the "mappings" tab check if .svc is mapped. If not map it to 

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll

    And rest of the mapping details same as with the .asmx map.


    http://webservices20.blogspot.com/
    WCF Security, Performance And Testing Blog
    Tuesday, November 11, 2008 10:39 PM
  • Yes, i can browse an html, asp and aspx files.
    loofyan
    • Edited by loofyan Wednesday, November 12, 2008 7:52 AM
    Wednesday, November 12, 2008 7:43 AM
  • Hi, try to run follow command and test again.

    C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation>ServiceModelReg.exe -i
    Wednesday, November 12, 2008 7:50 AM
  • Thanks Zhao but i tried it allready.
    loofyan
    Wednesday, November 12, 2008 7:55 AM
  • What's the sub-status code for 404? you can check it with follow kb for the reason.

    318380 Description of Microsoft Internet Information Services (IIS) 5.0 and 6.0 status codes
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;318380
    Wednesday, November 12, 2008 8:13 AM
  • I  have installed .net framework 3.5 sp1 and it solved the problem.

    Thanks for all the answerers!
    loofyan
    • Marked as answer by loofyan Wednesday, November 12, 2008 12:51 PM
    • Unmarked as answer by loofyan Wednesday, November 12, 2008 12:51 PM
    • Unmarked as answer by loofyan Wednesday, November 12, 2008 12:51 PM
    • Unmarked as answer by loofyan Wednesday, November 12, 2008 12:51 PM
    • Unmarked as answer by loofyan Wednesday, November 12, 2008 12:51 PM
    • Marked as answer by Dinesh Ravva - MSFT Friday, November 21, 2008 8:27 AM
    Wednesday, November 12, 2008 11:41 AM
  • I just wanted to add my own two cents:

    I have been strugling with this behaviour myself this morning, and none of the above worked. After reading Zhao Wei's reply, I checked my log files and I could see this at the very right-most end of the log lines for the failed requests:

    2009-06-15 12:22:10 W3SVC1 127.0.0.1 GET /blst/WCF/auditingmodule/ServiceEndpoints/auditingmodule.svc - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729) 404 2 1260

    So I checked via http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/0f4ac79a-dc2b-4a5f-89c1-d57266aa6ffe.mspx?mfr=true that the status subcode "2" meant "Web service extension lockdown policy prevents this request."

    I used this to finally find this page that contained the answer: http://neilkilbride.blogspot.com/2008/02/windows-2003-iis-returns-404-for-aspnet.html

    To solve my issue, I simply went to IIS MMC, clicked on "Web service extensions" and clicked "Allow" for the ASP.Net v2.0.50727 .
    /Jesper www.idippedut.dk
    • Proposed as answer by dtfetz Friday, May 20, 2011 5:21 PM
    Monday, June 15, 2009 12:33 PM
  • I solved my 404 problem (not finding the svc file) using a slight variation of Jesper Stocholm's solution.

    I went to IIS MMC, clicked on "Web service extensions" and clicked "Allow" for the ASP.Net <latestVersion>

    In my case this was: ASP.NET v4.0.30319

     

    Friday, May 20, 2011 5:25 PM
  • Nice to hear that.
    Monday, May 23, 2011 5:24 AM