473,248 Members | 1,416 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,248 software developers and data experts.

how to determine hosted server url from within wcf service?

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
Apr 2 '08 #1
5 9596
paul korosi wrote:
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)?

--
Thanks,
Duy Lam Phuong
Apr 2 '08 #2
"Duy Lam" <du**********@gmail.comwrote in message
news:e4**************@TK2MSFTNGP05.phx.gbl...
paul korosi wrote:
>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)?

--
Thanks,
Duy Lam Phuong
sorry - should have said. it's hosted on IIS.

cheers,

paul
Apr 3 '08 #3
Uri uri = OperationContext.Current.IncomingMessageHeaders.To ;

Marc
Apr 3 '08 #4
"Marc Gravell" <ma**********@gmail.comwrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl...
Uri uri = OperationContext.Current.IncomingMessageHeaders.To ;

Marc
Thanks Marc - you're a champ.
Apr 4 '08 #5
No problem; sorry the reply was so terse, but I was in a hurry...

Marc
Apr 4 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Horhayson | last post by:
Running W2k Server SP4, my application event viewer says that the Active Server Pages service is stopped. How and what do I need to do to start the service, and why does it stop? *** Sent...
6
by: FS Liu | last post by:
Hi, In my current ATL server project, I have to parse the input in the client application's request to find out the different combination of parameters, instead of using SOAP. For this reason,...
7
by: Dennis C. Drumm | last post by:
I would like to be able to update an xml file located on my hosted server from my local computer. The server requires a user name and password to access the web site for writing or updating...
5
by: Chris Podmore | last post by:
I have a problem with the Infragistics web controls on a hosted server. I get Security Exception errors. It appears that my site doesn’t have the correct privileges, how can I overcome the...
1
by: Newbie | last post by:
Hi all, - Anyone here know how to access ASP.NET's "Web Site Administration Tool" on the production/hosted server? something that on my development machine the URL is:...
2
by: dalton | last post by:
I wrote a few webservices in VB .NET 1.1 and have verified they are functional on localhost. The website they are intended for is paid hosting (I don't have direct access to the server) that...
0
by: Derftics | last post by:
Hi to all, Good day. I am in need of help badly. My company have just give us guidelines for MSSQL secuirity hardening, part of it is to use a "WINDOWS LOCAL ACCOUNT THAT IS NOT A MEMBER OF...
1
by: aj | last post by:
SQL Server 2005 SP2 What exactly is the purpose of the SQL Server Browser service? On the Services dialog, its description is: "Provides SQL Server connection information to client computers." ...
0
by: santhanalakshmi | last post by:
Hi, I installed MSSQL 2008 in my local system. After installation process gets completed, i login as LOCAL(127.0.0.1). The MSSQL connected for me and i worked for a day very finely. ...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.