Loading ...

Setup WCF Project in IIS 7 | CodeAsp.Net

Setup WCF Project in IIS 7

0 (0votes)

How to setup IIS to work with WCF

By default WCF is not configured in IIS, the .svc handlers are usually missing so you won't be able to run or test your WCF project after publishing it. Adding .svc file mappings is the first step, and can be done easily by following the below steps:

1. On the server (where you want the .svc mappings to be set in IIS) go to this folder: %windir%\Microsoft.NET\Framework\v3.0\WindowsCommunication Foundation\

(note: if your IIS website application pool is configured to run in 64-bit mode, then select the Microsoft.NET\Framework64 folder instead of Microsoft.NET\Framework)

2. Run this exe in command prompt (as Administrator) with the -i option: ServiceModelReg.exe –i

So the complete command in cmd prompt would look like:

C:\Windows\Microsoft.NET\Framework\v3.0\WindowsCommunication Foundation\ServiceModelReg.exe –i

This will install the .svc bindings on the IIS, and now your service should run once published.


Comments (1)

Very useful post, Vinz!A little more to contribute here:To start command prompt using Administrator account, either find the Command Prompt -> Right Click - Run As Administrator, or type in run: cmd and press CTRL+SHIFT+ENTER - this will run the CMD with Administrator privileges. Eventually, third way would be using /runas /user:AdministratorAccount /.. - directly from command prompt

Top Posts