Today, I will show you how to to publish WCF Web Service on IIS. I assume your have a working version of your WCF on IIS Express and you want to "publish" it.
Step 1 - Install IIS
Go to: Control Panel Programs and Features Turn Windows Features On and Off
There are 4 things which need to be installed:
- Internet Information Services
- Internet Information Services Hostable Web Core
- Windows Communication Foundation HTTP Activation
- Windows Communication Foundation Non-HTTP Activation
It would be advisable to restart the computer at this point. In order to ensure that it is properly configured do the following:
Start All Programs Visual Studio (2013) Visual Studio Tools Command Prompt
In the command prompt: run the following:
1 |
aspnet_regiis -ir |
This command will ensure that ASP.NET is properly installed.
1 |
ServiceModelReg.exe -ia |
This will ensure that the WCF is installed
Step 2: Adding Application
You probably want to change the setting from .NET 2.0 to 4.0 for default application:
Go to: Control Panel Administration Tools Internet Information Services (IIS) Manager
Double click on the "DefaultAppPool" and change from .NET 2.0 to .NET 4.0.
Step 3: Adding new Site
Create the new site.
1. Name of your site
2. Ensure that you are using an application that is of type .NET 4.0 (or what ever the version you want)
3. Specify the path (this is where you will publish the site)
4. Make sure that you are using a different port than 80 (unless you don't have the default site)
Step 4: Publishing Project
Make sure you are running VS with Admin rights
VS doesn't allow you to publish the entire solution so you have to publish project by project. If you have one project than that's easy.
- Right-click on the project and select Publish.
- Select Web Deploy
- server: localhost
Name: Solution Name/Project (I think you can give anything you want)
destination: server:port e.g. localhost:81
DONE!