472,981 Members | 1,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,981 software developers and data experts.

retrieve local machine environment variable from ASP page

Hi ASP Expert,

My goal is to retrieve my local machine's %USERNAME% environment variable
from ASP page.
When I enter http://RemoteServerName/testusername.asp?id=%USERNAME% directly
into the IE Browser URL box, %USERNAME% is repalced with the local machine
ID. However, when I create a
<a href="http://RemoteServerName/testusername.asp?id=%USERNAME%"> get
mahcine id</a> in an html file and use Request.Querystring("id") to retrieve
it in testusername.asp page, it returns "%USERNAME%". I guess IE browser is
smart enough to replace %USERNAME% with the local environment variable value
before sending URL string to the web server when you type directly into the
Browser URL box.

My question is , is there any way to retrieve local machine's environment
variable, %USERNAME% from ASP page?

Thanks very much!!!
--
-adam
Jun 1 '06 #1
2 3580
=?Utf-8?B?YWRhbQ==?= wrote on 01 jun 2006 in
microsoft.public.inetserver.asp.general:
My goal is to retrieve my local machine's %USERNAME% environment
variable from ASP page.
When I enter http://RemoteServerName/testusername.asp?id=%USERNAME%
directly into the IE Browser URL box, %USERNAME% is repalced with the
local machine ID. However, when I create a
<a href="http://RemoteServerName/testusername.asp?id=%USERNAME%"> get
mahcine id</a> in an html file and use Request.Querystring("id") to
retrieve it in testusername.asp page, it returns "%USERNAME%". I
guess IE browser is smart enough to replace %USERNAME% with the local
environment variable value before sending URL string to the web server
when you type directly into the Browser URL box.

My question is , is there any way to retrieve local machine's
environment variable, %USERNAME% from ASP page?


What do you mean by "local machine"??

Serverside or clientside?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jun 1 '06 #2
How about by authenticating your users? If the NT username matters to you,
can I assume that this is on an intranet? If so, in a domain I'd hope?
Turn on Integrated Windows Authentication in IIS and turn off anonymous
access and use Request.ServerVariables("AUTH_USER") to get the account name.

Ray at work

"adam" <ad**@discussions.microsoft.com> wrote in message
news:80**********************************@microsof t.com...
Hi ASP Expert,

My goal is to retrieve my local machine's %USERNAME% environment variable
from ASP page.
When I enter http://RemoteServerName/testusername.asp?id=%USERNAME%
directly
into the IE Browser URL box, %USERNAME% is repalced with the local machine
ID. However, when I create a
<a href="http://RemoteServerName/testusername.asp?id=%USERNAME%"> get
mahcine id</a> in an html file and use Request.Querystring("id") to
retrieve
it in testusername.asp page, it returns "%USERNAME%". I guess IE browser
is
smart enough to replace %USERNAME% with the local environment variable
value
before sending URL string to the web server when you type directly into
the
Browser URL box.

My question is , is there any way to retrieve local machine's environment
variable, %USERNAME% from ASP page?

Thanks very much!!!
--
-adam

Jun 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Carlos Gomez | last post by:
Question 1 Is there a way to execute a page, retrieve some information out of it and then present it in my page? example: The user access MyPage.asp MyPage.asp <somehow, internally> calls...
0
by: pwldev | last post by:
Sorry if this isn't a good place for this question. I have a problem with losing cookie values whenever a user's local machine date/time is behind the date & time of the IIS machine. The login...
0
by: Mr. Land | last post by:
Hello. I'm having trouble creating a new Web project using VS .NET 2003 on the local default web. I've done a lot of research about this and found a lot of suggestions, but none of them seem to...
3
by: Robin Tucker | last post by:
I'm fetching a list of SQL servers on a domain using a function that returns strings, including "(local)" for the local machine (if it has an SQL server on it). Now, presumably in a different...
23
by: Timothy Madden | last post by:
Hello all. I program C++ since a lot of time now and I still don't know this simple thing: what's the problem with local functions so they are not part of C++ ? There surely are many people...
6
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a...
6
by: Michael | last post by:
I am running an application that requires "Full Trust" which is declared in the assembly. How do I trap for the System.Security.Policy.PolicyException that is raised by a local machines CAS if...
0
by: Salim Fadhley | last post by:
I'm looking for a method to retrieve a Windows Domain name (not a DNS Domain name). I know this can be done by simply reading an environment variable, however on the machines I need to work with...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.