Request.ServerVariables("SERVER_NAME") is only returning IP

Request.ServerVariables("SERVER_NAME") is only returning IP

am 28.02.2007 22:50:22 von Ethan Lincoln

We have the Request.ServerVariables("SERVER_NAME") used in a classic ASP
page using IIS 6.

It used to return our website name: www.xxx.name.this when using IIS 5,
now it is returning the IP address when we type the full www. url.

How can I fix this behavior?

*** Sent via Developersdex http://www.developersdex.com ***

Re: Request.ServerVariables("SERVER_NAME") is only returning IP

am 28.02.2007 23:46:52 von exjxw.hannivoort

E L wrote on 28 feb 2007 in microsoft.public.inetserver.asp.general:

> We have the Request.ServerVariables("SERVER_NAME") used in a classic ASP
> page using IIS 6.
>
> It used to return our website name: www.xxx.name.this when using IIS 5,
> now it is returning the IP address when we type the full www. url.
>

Are you sure?

Both SERVER_NAME and HTTP_HOST return the server URL here under IIS6.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: Request.ServerVariables("SERVER_NAME") is only returning IP

am 01.03.2007 04:00:33 von mmcginty

"E L" wrote in message
news:OMuZzJ4WHHA.4188@TK2MSFTNGP06.phx.gbl...
> We have the Request.ServerVariables("SERVER_NAME") used in a classic ASP
> page using IIS 6.
>
> It used to return our website name: www.xxx.name.this when using IIS 5,
> now it is returning the IP address when we type the full www. url.
>
> How can I fix this behavior?

I seem to recall that you only get the DNS name if "host headers" are
defined for the virtual site... so maybe a difference in configuration?


-Mark



> *** Sent via Developersdex http://www.developersdex.com ***