<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How To Obtain The Name Of The Client From The ASP Server</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/05/09/how-to-obtain-the-name-of-the-client-from-the-asp-server.aspx</link><description>Here's a question about client side vs. server side scripting that I got recently: 
 I want to get the machine name of the client the request is being made from. With ASP I can get the IP address using this code: ipaddr = Request.ServerVariables("REMOTE_ADDR</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: How To Obtain The Name Of The Client From The ASP Server</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/05/09/how-to-obtain-the-name-of-the-client-from-the-asp-server.aspx#9453115</link><pubDate>Mon, 02 Mar 2009 01:13:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9453115</guid><dc:creator>WellDuh</dc:creator><description>&lt;p&gt;Pretty sure there is a way for client side script to return the localhost environmental variable to server (Windows/Linux/OS X) but I am not coder. I was looking for example of coding myself for a bet.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9453115" width="1" height="1"&gt;</description></item><item><title>re: How To Obtain The Name Of The Client From The ASP Server</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/05/09/how-to-obtain-the-name-of-the-client-from-the-asp-server.aspx#9453109</link><pubDate>Mon, 02 Mar 2009 01:09:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9453109</guid><dc:creator>WellDuh</dc:creator><description>&lt;p&gt;LOL - not good argument for why client names cannot be returned...&lt;/p&gt;
&lt;p&gt;sort of silly to worry about given that they need to be inside the firewall already to exploit client names.&lt;/p&gt;
&lt;p&gt;Worse client IPs are returned and if they are not RFC 1918 &amp;nbsp;attackers do not need client hostname.&lt;/p&gt;
&lt;p&gt;Client hostname is about as useful as RFC 1918 local IP...not useless &lt;/p&gt;
&lt;p&gt;but easily forgone when you already have network access inside firewall &amp;amp; can scan&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9453109" width="1" height="1"&gt;</description></item><item><title>re: How To Obtain The Name Of The Client From The ASP Server</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/05/09/how-to-obtain-the-name-of-the-client-from-the-asp-server.aspx#9408903</link><pubDate>Mon, 09 Feb 2009 19:34:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9408903</guid><dc:creator>Alon</dc:creator><description>&lt;p&gt;Nice..!!!&lt;/p&gt;
&lt;p&gt;Work nice.&lt;/p&gt;
&lt;p&gt;For all of you who got &amp;quot; Access is denied. &amp;quot;&lt;/p&gt;
&lt;p&gt;you should verify that your iis_user has permission execute cmd.exe file.&lt;/p&gt;
&lt;p&gt;you can copy it to root directory C:\Inetpub\wwwroot and trust permission to this file to be executable&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9408903" width="1" height="1"&gt;</description></item><item><title>re: How To Obtain The Name Of The Client From The ASP Server</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/05/09/how-to-obtain-the-name-of-the-client-from-the-asp-server.aspx#5279367</link><pubDate>Fri, 05 Oct 2007 01:31:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5279367</guid><dc:creator>zuhair</dc:creator><description>&lt;p&gt;this is not working at all, if that becuase i use free hosting?&lt;/p&gt;
&lt;p&gt;any way, what type of information can i get from &amp;nbsp;machine, IP is not refernce to know who visit my site.&lt;/p&gt;
&lt;p&gt;if thier code for that&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5279367" width="1" height="1"&gt;</description></item><item><title>re: How To Obtain The Name Of The Client From The ASP Server</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/05/09/how-to-obtain-the-name-of-the-client-from-the-asp-server.aspx#3597679</link><pubDate>Fri, 29 Jun 2007 08:04:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3597679</guid><dc:creator>Gelo</dc:creator><description>&lt;p&gt;you know what these codes will just excute the commands on the server and not on the clients pc...&lt;/p&gt;
&lt;p&gt;i think i'm getting the conclusion of this and that is we can't get the computer name of the client pc.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3597679" width="1" height="1"&gt;</description></item><item><title>re: How To Obtain The Name Of The Client From The ASP Server</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/05/09/how-to-obtain-the-name-of-the-client-from-the-asp-server.aspx#3427568</link><pubDate>Wed, 20 Jun 2007 19:28:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3427568</guid><dc:creator>Roger</dc:creator><description>&lt;p&gt;It works for me&lt;/p&gt;
&lt;p&gt;Function getComputerName() &lt;/p&gt;
&lt;p&gt;Dim oShell&lt;/p&gt;
&lt;p&gt;Dim oExec&lt;/p&gt;
&lt;p&gt;Set oShell = CreateObject(&amp;quot;WScript.Shell&amp;quot;) &lt;/p&gt;
&lt;p&gt;Set oExec = oShell.Exec(&amp;quot;hostname&amp;quot;) &lt;/p&gt;
&lt;p&gt;sOutput = oExec.StdOut.ReadAll &lt;/p&gt;
&lt;p&gt;Set oExec = Nothing &lt;/p&gt;
&lt;p&gt;Set oShell = Nothing &lt;/p&gt;
&lt;p&gt;getComputerName = sOutput &lt;/p&gt;
&lt;p&gt;end Function &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3427568" width="1" height="1"&gt;</description></item><item><title>re: How To Obtain The Name Of The Client From The ASP Server</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/05/09/how-to-obtain-the-name-of-the-client-from-the-asp-server.aspx#3094248</link><pubDate>Tue, 05 Jun 2007 11:49:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3094248</guid><dc:creator>NASA</dc:creator><description>&lt;p&gt;Error Type:&lt;/p&gt;
&lt;p&gt;WshShell.Exec (0x80070005)&lt;/p&gt;
&lt;p&gt;Access is denied&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3094248" width="1" height="1"&gt;</description></item><item><title>re: How To Obtain The Name Of The Client From The ASP Server</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/05/09/how-to-obtain-the-name-of-the-client-from-the-asp-server.aspx#2374615</link><pubDate>Wed, 02 May 2007 17:13:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2374615</guid><dc:creator>isomer</dc:creator><description>&lt;p&gt;Lalit's code&lt;/p&gt;
&lt;p&gt;Error Type:&lt;/p&gt;
&lt;p&gt;WshShell.Exec (0x80070005)&lt;/p&gt;
&lt;p&gt;Access is denied. &lt;/p&gt;
&lt;p&gt;/super/GetUserID.asp, line 41&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2374615" width="1" height="1"&gt;</description></item><item><title>re: How To Obtain The Name Of The Client From The ASP Server</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/05/09/how-to-obtain-the-name-of-the-client-from-the-asp-server.aspx#1847879</link><pubDate>Sat, 10 Mar 2007 00:48:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1847879</guid><dc:creator>Rams</dc:creator><description>&lt;p&gt;this is not working.&lt;/p&gt;
&lt;p&gt;it returns ip address, not computer name.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1847879" width="1" height="1"&gt;</description></item><item><title>re: How To Obtain The Name Of The Client From The ASP Server</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/05/09/how-to-obtain-the-name-of-the-client-from-the-asp-server.aspx#1741250</link><pubDate>Thu, 22 Feb 2007 14:16:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1741250</guid><dc:creator>GDS</dc:creator><description>&lt;p&gt;I wanted to know it for the purpose of IT Support on our company intranet. We use the computer name for a number of things including (but not solely) VNC.&lt;/p&gt;
&lt;p&gt;Mostly, I need to know it because my manager told me I did!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1741250" width="1" height="1"&gt;</description></item></channel></rss>