Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 3rd, 2009, 10:24 AM
Authorized User
 
Join Date: Sep 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default Read remote hostname from server

Hi to All,

before posting I have read the topics of this forum and I saw in internet interesting articles reltative to my problem,
but,
up to now i' m not able to solve it...

I have a page.asp,
and I want to catch, to extract the name of the client, of the host that in intranet open the server page.asp ...
I have tried in different ways but the results are:

<%@ Language=VBScript %>
<% Option Explicit %>
<html>
<head>
<meta http-equiv="Content-Language" content="it">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>AAA</title>
</head>
<body>
<pre>
<%=Request.ServerVariables("REMOTE_HOST")%>
<%=Request.ServerVariables("REMOTE_ADRR")%>
<%=Request.ServerVariables("HTTP_HOST")%>
<%=Request.ServerVariables("HTTP_REFERER")%>
</pre>

REMOTE_HOST and REMOTE_ADRR give me both the IP adress,
HTTP_HOST returns the server name and not the client name,
HTPP_REFERER returns nothing ...

I have IIS,
I saw the property of Services of my Server and I controlled that NetBios is enabled,
I have even seen my FireWall,

what I want is to extract the information of the client that for example can be reached with regedit in:

HKEY_LOCAL_MACHINE / SYSTEM / ControlSet001 / Control / ComputerName / computerName

Thanks a lot in advance for Your attention !!!
 
Old September 3rd, 2009, 11:59 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Please check the following link which may help you:
http://classicasp.aspfaq.com/general...he-server.html
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
The Following User Says Thank You to om_prakash For This Useful Post:
il_betto (September 8th, 2009)
 
Old September 8th, 2009, 10:34 AM
Authorized User
 
Join Date: Sep 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks a lot a lot OM_PRAKASH because with your useful link I have solved my problem

The code remains the same:
here I put the only variable that returns remote hostname that submits or opens the server page.asp

<%@ Language=VBScript %>
<% Option Explicit %>
<html>
<head>
<meta http-equiv="Content-Language" content="it">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>AAA</title>
</head>
<body>
<pre>
<%=Request.ServerVariables("REMOTE_HOST")%>
</pre>


But BEFORE we have to do these things on the Server:

1. open DOS window:
2. go to folder C:\Inetpub\AdminScripts
3. write this sintax:
CScript.Exe adsutil.vbs set w3svc/EnableReverseDNS TRUE

in this way is set not the IP adress to be received, but the hostname






Similar Threads
Thread Thread Starter Forum Replies Last Post
VB Express and SQL server on remote server questio HoosierDaddy61 Visual Basic 2005 Basics 0 February 22nd, 2006 11:27 AM
connecting web server and remote db server via asp moreyt Classic ASP Databases 0 May 31st, 2005 12:13 AM
Linking Remote Sql Server with Web server yeetesh Pro VB Databases 1 May 26th, 2005 04:13 AM
get hostname from IP cygnusx04 Classic ASP Basics 12 October 14th, 2004 02:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.