how to determine hosted server url from within wcf service?

P

paul korosi

Hi, I've got a wcf service that is hosted on my local machine. I need to
determine the hosted url of the service from within the service but cannot
work out how to do it.
HttpContext.Current always returns null, which i suppose might make some
sense. Does anyone know of a way to get the url?

TIA,

paul
 
D

Duy Lam

paul said:
Hi, I've got a wcf service that is hosted on my local machine. I need to
determine the hosted url of the service from within the service but cannot
work out how to do it.
HttpContext.Current always returns null, which i suppose might make some
sense. Does anyone know of a way to get the url?

TIA,

paul

Where did you host your service? A Windows service, IIS or normal
program (console or winform)?
 
P

paul korosi

Duy Lam said:
Where did you host your service? A Windows service, IIS or normal program
(console or winform)?

sorry - should have said. it's hosted on IIS.

cheers,

paul
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top