Resolve AddressAccessDeniedException: HTTP could not register URL http://+:80/ Error in WCF Service

I was facing one issue with hosting wcf service with httpbinding. I was getting below error message

"HTTP could not register URL http://+:8088/MarketService/. Your process does not have access rights to this namespace (see for details)."

It clearly says service host process does not have access rights to run on particular port. To resolve I run command

on command prompt.Note command prompt should be "Run as administrator".

netsh http add urlact url="http://+:8088/MarketService user=domain\userid

After this my service was running perfect.

Source code in which I was getting problem

using (var productHost = new ServiceHost(typeof(MarketDataProvider))) 
        ServiceEndpoint productEndpoint = 
		new NetTcpBinding(), "net.tcp://localhost:8000/MarketService"); 
        ServiceEndpoint producthttpEndpoint = 
		new BasicHttpBinding(), "http://localhost:8088/MarketService"); 

Have fun with coding!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.