Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Always 'localhost' from Request.ServerVariables["SERVER_NAME"]

Reply
Thread Tools

Always 'localhost' from Request.ServerVariables["SERVER_NAME"]

 
 
L Scott
Guest
Posts: n/a
 
      08-31-2004
I am wanting to get the machine name that is running IIS. I have code in
the 'Application_BeginRequest' event of the Global.asax and even if I access
the web site from another machine I am always getting 'localhost' in the
SERVER_NAME variable. Any way to get the actual machine name?

LWS


 
Reply With Quote
 
 
 
 
Nicole Calinoiu
Guest
Posts: n/a
 
      08-31-2004
See
http://msdn.microsoft.com/library/de...rvariables.asp
for the intended meaning of the SERVER_NAME server variable. For the local
machine name on the server, try using System.Environment.MachineName
instead.

HTH,
Nicole



"L Scott" <> wrote in message
news:...
>I am wanting to get the machine name that is running IIS. I have code in
> the 'Application_BeginRequest' event of the Global.asax and even if I
> access
> the web site from another machine I am always getting 'localhost' in the
> SERVER_NAME variable. Any way to get the actual machine name?
>
> LWS
>
>



 
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
Wireless Lan on/off switch always litup Terry Wireless Networking 1 08-14-2005 07:15 PM
File copy always interrupted over wireless network =?Utf-8?B?TWF0cml4Y3ViZWQ=?= Wireless Networking 1 02-28-2005 06:00 PM
Why do I always have to repair my network connection after rebooti =?Utf-8?B?Q29uZnVzZWRfQ29uc3VtZXI=?= Wireless Networking 2 11-28-2004 02:24 PM
belkin 54g always works on 11 Mbps hans Wireless Networking 2 11-03-2004 01:17 PM
Trying to create a CSS box that is always is always the width of an image placed inside it (and no wider) Deryck HTML 4 06-22-2004 08:25 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