WCF Newbie Problem

Discussion in 'ASP .Net Web Services' started by Tina, Jan 26, 2008.

  1. Tina

    Tina Guest

    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
    Tina, Jan 26, 2008
    #1
    1. Advertising

  2. Tina

    Chin2 Guest

    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.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
    >
    >
    >
    Chin2, Apr 17, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cowznofsky

    Problem adding a wcf web reference

    cowznofsky, Jun 22, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    468
    cowznofsky
    Jun 22, 2007
  2. Torben Laursen

    WCF problem with datacontract name

    Torben Laursen, Jul 30, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    369
    sloan
    Jul 30, 2008
  3. Jayakrishnan

    Session problem in WCF services

    Jayakrishnan, Feb 4, 2009, in forum: ASP .Net
    Replies:
    0
    Views:
    378
    Jayakrishnan
    Feb 4, 2009
  4. Simon
    Replies:
    0
    Views:
    1,008
    Simon
    Oct 13, 2009
  5. Cindy Lee
    Replies:
    1
    Views:
    2,104
    Mr. Arnold
    Mar 19, 2010
Loading...

Share This Page