Aaron
Aaron

Reputation: 2427

Running Multiple Services Over net.pipe in WCF

I am building a distributed application that will require 6 different services. I will have to demo the application on my XP laptop using Visual Studio 2008.

Is it possible to run multiple services on localhost at the same time, all using net.pipe?

For example:

net.pipe://localhost/DirectoryService
net.pipe://localhost/MathService

If not, is there any other way to host these WCF services without using IIS/webdev server? net.tcp? Something else?

Upvotes: 4

Views: 5086

Answers (3)

Anderson Imes
Anderson Imes

Reputation: 25650

Another thing you should know about net.pipe addresses is that you are providing a URN, not a URL. net.pipe is an in-memory implementation and the "address" you are specifying can be anything.

net.pipe://IHateCats
net.pipe://NamedPipes/Are/Fast

These will all work, regardless of any other factor. It's just the unique identifier for that named pipe. The network stack is not involved with this form of communication.

Upvotes: 9

Matt Davis
Matt Davis

Reputation: 46052

Yes, providing the binding addresses are unique. The two examples you've shown will work fine with the net.pipe binding.

Keep in mind the net.pipe binding will only work on the local machine. If you want your services to be accessible from remote machines, you'll need to use a different binding, such as net.tcp. That said, net.pipe is the recommended binding to use if your services run on the localhost because it is more efficient that the other bindings.

Upvotes: 8

sipsorcery
sipsorcery

Reputation: 30714

You can use HTTP as a service end point without IIS, take a look at the ServiceHost class. That's what I use for local WCF tesing and it works very well.

Upvotes: 2

Related Questions