HTTP 404 when accessing .svc file in IIS

I recently created a WCF service that works great when testing with Visual Studio 2008. but when I deploy the project to IIS and I try to access the .svc file from IIS, I get this error:

"Server Error in '/' Application.The resource cannot be found. " 

I have had this problem in the last 4 days.

in the IIS Manager Manager mappings, I see two entries for .svc:

 svc-Integrated and svc-ISAPI-2.0 
+65
c # wcf
Apr 09 '10 at 17:02
source share
11 answers

You need to add a mapping for the SVC extension in ASP.NET. The easiest way to do this is to run ServiceModelReg.exe -i from C: \ Windows \ Microsoft.NET \ Framework \ v3.0 \ Windows Communication Foundation. You may also need to enable ASP.NET if you have not already done so.




If you are using Windows Server 2012 or 2016, follow these instructions:

  • WCF on IIS8; * Displaying the .svc handler does not work
+64
Apr 09 2018-10-17T00:
source

What worked for me in Windows 2012 Server R2:

WCF HTTP 404

Thanks "Aaron D"

+75
Aug 25 '15 at 14:24
source

I found these instructions in a blog post that indicated this step that worked for me (Windows 8, 64-bit):

Make sure that in the Windows functions you have both WCF options in the .Net framework. So, go to Control Panel β†’ Programs and Features β†’ Turn Windows Features ON / OFF β†’ Functions β†’ Add Functions β†’ .NET Framework XX Features Make sure that the .Net framework says it is installed and make sure WCF activation is enabled under it. node (the checkbox is checked), and both options under activation of WCF are also checked.
  These are:
 * HTTP Activation
 * Non-HTTP Activation
 Both options need to be selected (checked box ticked). 
+49
Nov 20 '13 at 19:56
source

I see that you have already solved your problem, but for posterity:

We had a similar problem and the SVC handler was already installed correctly. Our problem was handling the requests of the ExtensionlessUrl handler before they reached the SVC handler.

To check this - in the handler mappings in IIS Manager at the web server level, look at the list of handlers in order (this is an option on the right side). If various ExtensionlessUrl handlers appear above the SVC handlers, then re-move them down until they are down.

+4
Jul 23 2018-12-12T00:
source

Checks that your directory has been converted to an application, is your IIS.

+1
May 20 '11 at
source

Today I had the same problem.

For me, the solution was to log into IIS, right-click on the name of the new website, select β€œProperties”, β€œASP.Net” and change the version of ASP.Net from β€œ1.1.4322” (which he installed as by default) up to 2.0.50727.

As soon as I did this, I could right-click on the .svc file, click Browse and see the friendly service web page.

+1
Jul 27 '12 at 14:12
source

It can also become a problem after enabling IIS 6 Management Compatibility on Windows 10. Setting up HTTP activation protection in WCF will fix the problem.

+1
Feb 01 '17 at 17:05
source

In my case, the error was caused by incorrect mapping settings in the applicationhost.config file (\ System32 \ inetsrv \ config). For some reason, Visual Studio 2013 messed it up when creating a virtual directory in IIS. The fix was to manually edit the section of sites in the file.

0
Dec 09 '14 at 11:25
source

There are 2 versions of the .net framework that are provided in the functions of the add role / function function on the 2012 server

but. 3.5

b. 4.5

Depending on the structure you are using, you can enable HTTP Activation in WCF services. :)

0
Sep 10 '15 at 7:30
source

In my case, Win 10. the applicationHost.config file is corrupted by VS 2012. And you can get a copy of the history of this file in C: \ inetpub \ history. Then restart IIS and it works correctly.

0
Sep 26 '16 at 16:32
source

I had to add the .svc extension to the allowed extensions in the query filtering settings (I used to get 404.7 errors).

enter image description here

0
Jan 17 '19 at 12:23
source



All Articles