Results 1 to 2 of 2

Thread: Host WCF Service

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2008
    Posts
    103

    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"

  2. #2
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    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?
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width