-
Feb 12th, 2010, 08:17 PM
#1
Thread Starter
Lively Member
Host WCF Service
Hi,
I have the following instructions which are auto generated when creating a WCF Service. My question is:
What is meant by the term 'host' in relation to the service??
Is this referring to a client which uses the methods defined in the interface? Or is a host something that runs alongside the Service at server side?
basically... does the host request from the service (is it the client)? or is it part of the service, and a seperate client app requests from both this and the service?
thanks.
HOW TO HOST THE WCF SERVICE IN THIS LIBRARY IN ANOTHER PROJECT
You will need to do the following things:
1) Add a Host project to your solution
a. Right click on your solution
b. Select Add
c. Select New Project
d. Choose an appropriate Host project type (e.g. Console Application)
2) Add a new source file to your Host project
a. Right click on your Host project
b. Select Add
c. Select New Item
d. Select "Code File"
3) Paste the contents of the "MyServiceHost" class below into the new Code File
4) Add an "Application Configuration File" to your Host project
a. Right click on your Host project
b. Select Add
c. Select New Item
d. Select "Application Configuration File"
5) Paste the contents of the App.Config below that defines your service endoints into the new Config File
6) Add the code that will host, start and stop the service
a. Call MyServiceHost.StartService() to start the service and MyServiceHost.EndService() to end the service
7) Add a Reference to System.ServiceModel.dll
a. Right click on your Host Project
b. Select "Add Reference"
c. Select "System.ServiceModel.dll"
8) Add a Reference from your Host project to your Service Library project
a. Right click on your Host Project
b. Select "Add Reference"
c. Select the "Projects" tab
9) Set the Host project as the "StartUp" project for the solution
a. Right click on your Host Project
b. Select "Set as StartUp Project"
-
Feb 17th, 2010, 09:37 AM
#2
Re: Host WCF Service
What is your question? it is not very clear, why is the a list of steps at the end of your post?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|