473,657 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Cur rent 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 9652
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.Cur rent 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**********@g mail.comwrote in message
news:e4******** ******@TK2MSFTN GP05.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.Cu rrent 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 = OperationContex t.Current.Incom ingMessageHeade rs.To;

Marc
Apr 3 '08 #4
"Marc Gravell" <ma**********@g mail.comwrote in message
news:%2******** *******@TK2MSFT NGP05.phx.gbl.. .
Uri uri = OperationContex t.Current.Incom ingMessageHeade rs.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
5439
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 via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
6
4664
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, I am not using ATL server web service project. On client side, I use POST to send XML to web server. I know I should use ISAXXMLReader in the server program. I also know that the parser can be used for many different handlers in the DLL. I found...
7
2045
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 files. Could someone refer me to a doc that explains this or provide some sample code? Thanks,
5
1653
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 problem without getting the service provider to make changes? I don’t know if the service provider will make the required changes or not. Or have I just got something else wrong? This is the actual error. Security Exception Description: The...
1
1514
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: http://localhost:1795/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=D:\!!!Projects2\CozyCollection\Site20\&applicationUrl=/coll20. Is ASP.NET 2.0's built-in authentication and authorization classes can work out-of-the-box, or is it needs some kind of extra...
2
2422
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 supports .NET 1.1. After transferring the project to the site if I try to browse to the .asmx file it always comes up with the standard "Server Application Unavailable" error. Sometimes I have been able to get it to show me the available services
0
1291
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 ADMINISTRATOR GROUP" to run the SQL server agent service. As I change the current settings and apply the new local windows acoount using enterprise manager so that all the necessary priviledge for registry, folders and local policy are automatically...
1
16801
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." So I thought turning it off would cause that particular SQL Server to not be advertised on the network when someone does a "Browse for More" in Mgmt Studio and looks at the network servers tab.
0
1252
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. Once, i shut down my system, the MSSQL server is not starting up for me. I don't know whats a problem. while trying to start MSSQLSERVER Service ERROR: in windows service: could not start the SQL Server(MSSQLSERVER) service on Local...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.