2

I am getting the below error when I execute the application. error

How can I solve this?

A Coder
  • 3,039
  • 7
  • 58
  • 129
  • 1
    Why can't I see the attached image??? I have attached image of the error. – A Coder Jun 21 '13 at 09:30
  • Select the error text, copy it, paste it into a search engine and find the answer. For example: [HTTP could not register URL http://+:8000/HelloWCF/. Your process does not have access rights to this namespace](http://stackoverflow.com/questions/8727293/http-could-not-register-url-http-8000-hellowcf-your-process-does-not-have). – CodeCaster Jun 21 '13 at 09:30
  • @CodeCaster: Kindly find the answer below. – A Coder Jun 21 '13 at 09:32
  • This question already has been answered on this site, see my link. – CodeCaster Jun 21 '13 at 09:32

2 Answers2

1

As the error message suggests, you don't have permission to host your service in that namespace. Right-click on Visual Studio and Run as Administrator.

keyboardP
  • 68,824
  • 13
  • 156
  • 205
0

In windows 7 or 2008 and above use this command from administrator command prompt

netsh http add urlacl url=http://+:8080 user=DOMAIN\user

where user is the user or service account that will run the WCF service. For XP or windows 2003 you will have to use the htpcfg tool. More details here

The service doesn't need local admin rights but an administrator needs to give the right to reserver the http url namespace as an installation step.

softveda
  • 10,858
  • 6
  • 42
  • 50