Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   WCF Newbie Problem (http://www.velocityreviews.com/forums/t787431-wcf-newbie-problem.html)

Tina 01-26-2008 03:57 PM

WCF Newbie Problem
 
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.IHelloI ndigoService),
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



Chin2 04-17-2008 05:20 AM

RE: WCF Newbie Problem
 
Hi Tina,

You need to have administrative rights to run a WCF service. Go through the
link below

http://msdn2.microsoft.com/en-us/library/bb924513.aspx


"Tina" wrote:

> 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.IHelloI ndigoService),
> 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
>
>
>



All times are GMT. The time now is 03:03 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.