Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Context.Request.ServerVariables("HTTP_HOST") returns alway..

 
   Web Hosting and Web Master Forums (Home) -> IIS RSS
Next:  Form Page  
Author Message
nonscrivermi

External


Since: Dec 16, 2003
Posts: 11



(Msg. 1) Posted: Tue Sep 07, 2004 8:32 pm
Post subject: Context.Request.ServerVariables("HTTP_HOST") returns always localhost
Archived from groups: microsoft>public>inetserver>iis (more info?)

I read Context.Request.ServerVariables("HTTP_HOST") from an asp.net page,
but I've the problem that it returns always "localhost". I've tried to call
the web site as
http://server/site (server as netbios over tcp, not dns... in this net there
isn't a dns )
http://ip/site

from a remote pc, but nothing. I read always localhost.

I've tried to stop default web site and create a new site pointing to my
application, but it is the same.

What can I do?
The server is W2K server.

On several other servers, I read the host name I use to connect to the
server ("server" or ip address on previus examples).

thanks

 >> Stay informed about: Context.Request.ServerVariables("HTTP_HOST") returns alway.. 
Back to top
Login to vote
user1375

External


Since: Feb 03, 2004
Posts: 423



(Msg. 2) Posted: Wed Sep 08, 2004 9:08 am
Post subject: RE: Context.Request.ServerVariables("HTTP_HOST") returns always localhost [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Trapulo,

As I know, the HTTP_HOST variable comes from the HTTP request sent by
client and doesn't depend on any server side settings. For example:

If I access my site via: http://localhost/servervar.aspx , the
HTTP_HOST returned should be localhost.
http://servername:8080/servervar.aspx should be servername:8080.
http://www.domain.com/servervar.aspx should be www.domain.com.

So a suppose of mine is if you also have something like a reverse
proxy installed on the server, which catch the first-hand request and
then relay it to IIS. In this case, it's expected that the request
recevied by IIS could be localhost..

To track down this point, you can simply look at the REMOTE_ADDR
variable:
Context.Request.ServerVariables["REMOTE_ADDR"]

See if it's actually your remote client's IP address. I assume it
isn't and if so there must be something in the middle.

Looking forward to your findings.
Best regards,

WenJun Zhang
Microsoft Online Support
This posting is provided "AS IS" with no warranties, and confers no
rights.
Get Secure! - www.microsoft.com/security

 >> Stay informed about: Context.Request.ServerVariables("HTTP_HOST") returns alway.. 
Back to top
Login to vote
nonscrivermi

External


Since: Dec 16, 2003
Posts: 11



(Msg. 3) Posted: Wed Sep 08, 2004 7:23 pm
Post subject: Re: Context.Request.ServerVariables("HTTP_HOST") returns always localhost [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Today a co-worker has deleted web application folder and recreated it, and
now it seems that all works well.
No changes made on configurations, files, etc. and no restarts. I don't know
where the problem was.

However, thanks for your support

bye
 >> Stay informed about: Context.Request.ServerVariables("HTTP_HOST") returns alway.. 
Back to top
Login to vote
user1375

External


Since: Feb 03, 2004
Posts: 423



(Msg. 4) Posted: Thu Sep 09, 2004 5:52 am
Post subject: Re: Context.Request.ServerVariables("HTTP_HOST") returns always localhost [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You are welcome Trapulo. Smile
It's good news that the problem has been resolved.

Best regards,

WenJun Zhang
Microsoft Online Support
This posting is provided "AS IS" with no warranties, and confers no
rights.
Get Secure! - www.microsoft.com/security
 >> Stay informed about: Context.Request.ServerVariables("HTTP_HOST") returns alway.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
request by winhttpRequest returns HTTP 403 error. - I am using winHttprequest object to make a request to an asp page sitting on a different server. The IIS server returns a HTTP 403 error. If i request the same asp page using a browser the page is served. What security setting to i need to change to....

IIS 6.0 returns "Request Header too Long" with big Kerbero.. - I'm testing an upgrade of web applications from IIS5 to IIS6. The apps all use Windows Integrated Authentication. IIS6 (Win 2003 Server) consistently returns 400-Bad Request (Request Header too long). Using WFetch, I could see it does not like the big..

HOW TO Restrict FileSystemObject (fso) to ASP context - Hi all, Facing some hack activities from ZEHIR, I need to make sure that FileSystemObject is not being used out of the ASP context. That means I do not want a path to be out of the current site (basically, no way to acces hard disk root folders like..

ADODB.Field: Operation is not allowed in this context - http://support.microsoft.com/?scid=3Dkb;en-us;175261 Response.BinaryWrite Bitmap.DisplayBitmap(RS("Photo")) is where the = error occurs. Any idea how to fix this? Windows 2000 SP3. Thanks. --=20 George Hester ______________________________...

Help! - Error, Transaction Server, Context Wrapper, 4104 - We are having problems with one of our intranet iss servers. The server is Windows NT4 server+service pack 6a, IIS4.0, Site server 3.0+service pack4 The problem we are having is that the below services stop every couple of days on their own: -WWW..
   Web Hosting and Web Master Forums (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]