What is WCF HTTP Activation?
WCF stands for Windows Communication Foundation. It is a part of .NET that helps programs talk to each other over a network. These talks are called web services. HTTP Activation lets IIS start such a service when someone sends a request. IIS is the Windows program that serves websites.
If this feature is missing, you may see an error about handler mappings or a .svc file that cannot be served.
This guide is for Windows Server 2012. It is an older version. Newer versions of Windows Server use almost the same steps.
You need admin rights on the server. A restart may be needed, so pick a quiet time.
Steps
- Open Server Manager from the taskbar or Start screen.
- Click Manage at the top right.
- Click Add Roles and Features.
- Click Next on the first page.
- Choose Role-based or feature-based installation and click Next.
- Select your server from the list and click Next.
- Click Next on the Server Roles page. IIS should already be installed. If not, see our guide on installing IIS.
- On the Features page, expand .NET Framework 4.5 Features.
- Expand WCF Services.
- Tick HTTP Activation.
- If a box pops up asking to add required features, click Add Features.
- Click Next until you reach Confirmation.
- Click Install.
- Wait until the install ends, then click Close.
Use PowerShell instead
PowerShell is a command window with extra tools. Open it as administrator and run:
Install-WindowsFeature NET-WCF-HTTP-Activation45
This command installs the HTTP Activation feature for .NET 4.5.
Check the result
- Restart IIS by running
iisresetin an admin Command Prompt. - Open your service URL (the .svc address) in a browser.
- The service page should load without the error.
Quick recap
- WCF HTTP Activation lets IIS run .NET web services.
- Add it in Server Manager under Add Roles and Features, then Features.
- Or use the PowerShell command above.
- Run
iisresetand test your service.