WCF Newbie Problem

T

Tina

I'm going through this book on WCF and the first example has me writing a
WCF host in the form of a console app. The code is as follows:
using System.ServiceModel;

namespace Host
{
class Program
{
static void Main(string[] args)
{
using (ServiceHost host = new
ServiceHost(typeof(HelloIndigo.HelloIndigoService), new
Uri("http://localhost:8000/HelloIndigo")))
{
host.AddServiceEndpoint(typeof(HelloIndigo.IHelloIndigoService),
new BasicHttpBinding(), "HelloIndigoService");
host.Open();

Console.WriteLine("Press <ENTER> to terminate the service
host");
Console.ReadLine();

}
}
}
}

But when I run the host I get the following error:
HTTP could not register URL http://+:8000/HelloIndigo/. Your process does
not have access rights to this namespace

What's going on here? How can I address this?
Thanks,
T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top