Host WCF Service in IIS8

2. Remove existing Methods from IService1 Interface and add below method to your project.
Note : You can add any other method rather than my one.
3. Remove existing method from Service1 class and add below method implementation.
4. Cool now you have a simple service which you can host in IIS. before host it inside IIS check whether there is any error by building the solution ( Press F5)
5. Next go to machines C: drive and create a folder (example : C:\WCF_IIS )
Note : You can create a folder anyplace you like and This will be the physical folder which will run the WCF service.
- WcfService1.dll

7. Next go to the project folder and select following items and add those things to the WCF_IIS folder
- Web.config

8. Now inside WCF_IIS folder is looks like this.
9. Then add following permission to WCF_IIS Folder
- IIS_IUSRS : Read/Write permission
- Network Service : Read/Write Permssion

10. Now go to the IIS Manager and Add an application Pool


|
Value
|
||
Name
|
<< You can decide>>
|
||
.Net
Framework version
|
<version
4.0>
|
||
|
<Integrated>
|

Parameter
Name
|
Value
|
|
|
<< You can decide>>
|
|
Application Pool
|
This will be the
application pool which was created in the previous step.
|
|
Physical path
|
This will be the
path of the WCF folder which was created earlier. Ex: (C:\WCF_IIS)
|
|
Type
|
<< You candecide>>
|
|
IP Address
|
<< You can decide>>
|
|
Port
|
<< You can decide>>
|
|
Host
name
|
<< You can decide>>
|
12. Great now we are almost there to the final. now try to run you service. by entering URL or else you can do it through IIS
Comments
Post a Comment