Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > WCF Newbie Problem

Reply
Thread Tools

WCF Newbie Problem

 
 
Tina
Guest
Posts: n/a
 
      01-26-2008
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


 
Reply With Quote
 
 
 
 
Chin2
Guest
Posts: n/a
 
      04-17-2008
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
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Ajax Enabled WCF service and regular WCF? Cindy Lee ASP .Net 1 03-19-2010 05:59 PM
AJAX enabled WCF Service Vs Standard WCF Service Simon ASP .Net 0 10-13-2009 09:13 AM
Session problem in WCF services Jayakrishnan ASP .Net 0 02-04-2009 01:51 PM
WCF problem with datacontract name Torben Laursen ASP .Net 1 07-30-2008 06:46 PM
Problem adding a wcf web reference cowznofsky ASP .Net 0 06-22-2007 01:24 PM



Advertisments