Accessing Host Header within Web Services Method
Posted on 2004-11-01
I have a web service that I need to retreive the host header used to access the service. In classic ASP, I would use Request.ServerVariables("SERVER_NAME"), but I am having a hard time doing this from within VB.NET. In the web services "code-behind" (myservice.asmx.vb) page, I don't have access to the Request object, and if I try to use System.Web.HttpRequest object, it doesn't provide for any properties like ServerVariables, it only provides Equals and ReferenceEquals in the IntelliSense dropdowns. I just need to be able to determine the difference if the web service is being accessed via:
as opposed to:
Any help is appreciated!