Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF service not running / or not recognized on IIS

Tags:

c#

iis

wcf

I have a WCF service that is running fine on a few different servers, so I know there is no code issue with this. Recently we put up a new Windows 2012 server in our dev environment. I took the same deployment files and put them on the new server, created an application in IIS pointed to the folder with the files, but when I go to the URL all I get is what you see in the image below... for other services on the same IIS I get the expected result which is the page that shows the WSDL etc... Can someone tell me what I might be missing in my IIS setup? It seems like IIS is not recognizing that this is a WCF application.

enter image description here

like image 255
tjp69 Avatar asked Mar 15 '16 14:03

tjp69


2 Answers

I think this happens when you do not have HTTP Activation checked in your windows features on the machine running IIS.

enter image description here

If that does not fix it or it was allready checked then the ISAPI filter for ASP.Net may be messed up. Run aspnet_regiis to re-register the ASP.NET filters on the website.

like image 120
Scott Chamberlain Avatar answered Oct 05 '22 20:10

Scott Chamberlain


I figured out that I needed to add a Handler in IIS. If you click on the web site (in my case "Default Web Site") and the double click "Handler Mappings", then you can add a mapping for *.svc, like shown in the image:enter image description here

like image 45
tjp69 Avatar answered Oct 05 '22 22:10

tjp69