Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > host name of site

Reply
Thread Tools

host name of site

 
 
John A Grandy
Guest
Posts: n/a
 
      06-20-2006
ASP.NET 2.0 IIS 5.5.

In code-behind , how to determine the host name of the site ?


 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      06-21-2006
Hi Jhn,

Try this?

Response.Write(Request.ServerVariables("Server_Nam e"))


Ken
Microsoft MVP [ASP.NET]

"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:...
> ASP.NET 2.0 IIS 5.5.
>
> In code-behind , how to determine the host name of the site ?
>



 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      06-21-2006
Request.ServerVariables("HTTP_HOST")


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:...
> ASP.NET 2.0 IIS 5.5.


> In code-behind , how to determine the host name of the site ?



 
Reply With Quote
 
John A Grandy
Guest
Posts: n/a
 
      06-22-2006
Is this the same thing ?

Request.Url.Host


"Ken Cox [Microsoft MVP]" <> wrote in message
news:%...
> Hi Jhn,
>
> Try this?
>
> Response.Write(Request.ServerVariables("Server_Nam e"))
>
>
> Ken
> Microsoft MVP [ASP.NET]
>
> "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
> news:...
>> ASP.NET 2.0 IIS 5.5.
>>
>> In code-behind , how to determine the host name of the site ?
>>

>
>



 
Reply With Quote
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      06-23-2006
Hi John,

Yes, they're the same thing for the name of the server.

Ken
Microsoft MVP [ASP.NET]

"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:...
> Is this the same thing ?
>
> Request.Url.Host
>
>
> "Ken Cox [Microsoft MVP]" <> wrote in
> message news:%...
>> Hi Jhn,
>>
>> Try this?
>>
>> Response.Write(Request.ServerVariables("Server_Nam e"))
>>
>>
>> Ken
>> Microsoft MVP [ASP.NET]
>>
>> "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
>> news:...
>>> ASP.NET 2.0 IIS 5.5.
>>>
>>> In code-behind , how to determine the host name of the site ?
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Client Machine Name or Host name ? Anil G Java 4 01-31-2008 04:10 PM
Cisco PIX 501 - Port forwarded to an internal host via Static NAT doesn't work from internal host JoelSeph Cisco 9 01-23-2006 03:52 PM
How To: Allow For Accessing site By Only the Domain Name, Without the Host Name? Joey ASP .Net 0 09-15-2005 03:04 AM
PIX: how to allow 1 host from outside interface to access another host on the inside interface? jonnah Cisco 1 04-21-2004 02:26 PM
request.getHeader("Host") returns wrong host name Orpheus66 Java 0 07-30-2003 02:59 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57