WCF on IIS8; *.svc handler mapping doesn't work
220,028
Solution 1
More specifically:
- Run
Server Manager
(on task bar and start menu) - Choose the server to administer (probably local server)
- Scroll down to "
Roles and Features
" section. - Choose "
Add Role or Feature
" from Tasks drop down - On "
Add Role or Feature Wizard
" dialog, click down to "Features
" in list of pages on the left. - Expand
".Net 3.5"
or".Net 4.5"
, depending on what you have installed. (you can go back up to "roles
" screen to add if you don't have. - Under "
WCF Services
", check the box for "HTTP-Activation
". You can also add non-http types if you know you need them (tcp, named pipes, etc). - Click
"Install"
Button.
Solution 2
I had to enable HTTP Activation
in .NET Framework 4.5 Advanced Services
> WCF Services
Solution 3
turn ON the following on 'Turn Windows Features on or off'
a) .Net Framework 3.5 - WCF HTTP Activation and Non-Http Activation
b) all under WCF Services
Solution 4
Windows 8 with IIS8
- Hit
Windows+X
- Select
Programs and Features
(first item on list) - Select
Turn Windows Features on or off
on the left - Expand
.NET Framework 4.5 Advanced Services
- Expand
WCF Services
- Enable
HTTP Activation
Solution 5
I prefer to do this via a script nowadays
REM install the needed Windows IIS features for WCF
dism /Online /Enable-Feature /FeatureName:WAS-WindowsActivationService
dism /Online /Enable-Feature /FeatureName:WAS-ProcessModel
dism /Online /Enable-Feature /FeatureName:WAS-NetFxEnvironment
dism /Online /Enable-Feature /FeatureName:WAS-ConfigurationAPI
dism /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation
dism /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation45
REM Feature Install Complete
pause
Related videos on Youtube
Author by
Carl R
Updated on December 16, 2020Comments
-
Carl R over 3 years
I'm trying to get a WCF service running in IIS8 on Windows Server 2012 build 8400.
When installing the web role the WCF stuff (under 3.51) wasn't to be found like in Windows Server 2008.
When installed the svc handler mapping was missing, so i did a:
%windir%\Microsoft.NET\Framework\v3.0\WindowsCommunication Foundation\ServiceModelReg.exe –i
Now the handler mapping is there, but I still get:
The resource you are looking for does not have a handler associated with it.
(I removed the static file handler.)
The site is using the classic pipeline in order to use impersonation.
-
Josh Mouch over 11 yearsThis one didn't work in my case because I'm on Windows 8 (with IIS 8).
-
Dave Stein about 11 yearsIf you first ran ServiceModelReg.exe –i from the v3.0 directory, you need to also run ServiceModelReg.exe –ua to undo it before this will work.
-
aruno almost 11 yearsthis is what you need to do for Windows 8 where there is no server manager
-
Richard over 10 yearsFrom the command line: dism /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation /All
-
Umar Farooq Khawaja over 10 yearsThe key bit is turning on HTTP Activation.
-
Kiquenet over 10 yearsWhat is about gyorgybalassy.wordpress.com/2012/09/24/… ? which is better way ?
-
Kiquenet over 10 yearsany powershell script for do it programmatically ?
-
Kiquenet over 10 yearsWhat's about gyorgybalassy.wordpress.com/2012/09/24/… ?
-
aruno over 10 yearswe have one server so I don't ever get into advanced Powershell
-
Akira Yamamoto over 10 yearsI needed to restart the server =(
-
Ryan Shripat almost 10 yearsJosh - this worked for me with IIS 8.5 on Windows 8.1.
-
BeemerGuy over 9 years@GWTF -- you were right -- that's what I was missing; I used
ServiceModelReg.exe -u
to uninstall it from the v3.0 directory, and the features I added earlier (using the steps in the answer) just worked. -
MGOwen over 9 yearsI did this and seem to have killed my server. I only uninstalled the asp.net stuff under iis, but now when I remote in I get a black screen and a command prompt window, like the server is only "server core" now... :(
-
MGOwen over 9 yearsIn my case, this got IIS to serve the service url - the actual .svc file, like example.com/service.svc but not the methods like example.com/service.svc/Method?Parameter=1. If anyone else has this problem, check your bindings, see this question: stackoverflow.com/questions/26398049
-
rbrtl over 9 yearsI only had to turn on .Net Framework 3.5 - WCF HTTP Activation
-
Erick Smith over 9 yearsHad to enable the HTTPS binding for the site as well.
-
Shubh about 9 yearsThanks
dism /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation dism /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation45
were sufficient for me ... -
vcRobe about 9 yearsThis is the answer when you're hosting the WCF Service in Windows 8 and Windows 8.1
-
Dan Bechard about 9 yearsI was literally staring at the "Server Roles" page for an hour. I had no idea you could just click "Next" or click down to "Features" on the left. o_O +1
-
Thomas about 9 yearsThe http activation. Is it regardless if you use http / https? Thus is that a summary name for both or is there still a distinction needed there?
-
John almost 9 years@MGOwen when you remove some of the features of .net 4.5 it looks like it also removes the Server Graphical Shell, this can be added again with some commands.
-
dhruvpatel over 8 yearsI faced similar issue on IIS 10, Http Activation is turned off by default. Enabling it resolved the issue right away. Thanks!
-
watbywbarif about 8 yearsWorks for Windows 10, IIS 10
-
Jack0fshad0ws about 8 yearsI'd put two upvotes if it were possible ;). In my case it was migrated webservice from 2008 to 2012 R2 server. Thanks!
-
Paul Sturm about 7 yearsThis is the best way to fix this on a new 2012R2+ version of Windows Server. Probably works on 2012 as well but thankfully, I don't have anymore of those to try this out on.
-
Vaelen almost 7 yearsWorks for IIS 10 on Server 2016 too
-
Vladislav over 6 yearsThanks! Works on Windows Server 2016 with iis 10 too!)))
-
Kiquenet almost 6 yearsand using PowerShell script ?
-
gigi almost 6 yearsFrom powershell: ServerManager\Install-WindowsFeature NET-WCF-HTTP-Activation45
-
Keith Banner almost 4 years@Kiquenet These commands will all work in powershell. If you attempted to copy over Shubh's command directly you need to add a line break or semicolon after the first command before the second dism command.