Groups | Blog | Home
all groups > dotnet web services > july 2007 >

dotnet web services : WCF services


Robert Scheer
7/25/2007 5:08:36 AM
Hi.

I am trying to understand the structure of a WCF service but some
things are not clear to me. The samples I have tried set an endpoint
that uses localhost, as below:

svcHost.AddServiceEndpoint(GetType(ICoreElements), New
NetTcpBinding(), "net.tcp://localhost:")
svcHost.Open()

But I didn't create a virtual directory on IIS to set this service,
and it works. How does this work exactly? Do I ever need to point to
localhost or a web server in order for my service to run?

Another question... if I decide to use a configuration file, where
should I put it? On the service or on the consumer?

Regards,
Robert Scheer
Bill Block
7/25/2007 1:30:02 PM
With WCF, you are able to host your service endpoints within the
context of your own process, which is likely what is being done in the
samples you're looking at. If you use this mechanism, you do not need
to have a web server running in order to run your service - only your
service process. After starting your process, you should be able to
verify that the service is up and running by executing "netstat -t"
from the command line - you will see your service running on a port
waiting for clients to connect.

For more information on it take a look at http://msdn2.microsoft.com/en-us/library/bb332338.aspx
or search http://www.google.com/search?hl=en&q=self+hosting+wcf+site%3Amicrosoft.com&btnG=Search.

Hope the information helps,
Bill
AddThis Social Bookmark Button