473,414 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Access Client Side Environmental Variables

I have an asp.net application written in VB.net. I want to access a client
side environment variable. For instance, we set an environment variable for
the UserName.

So, I write the code for retrieving the UserName. Instead of getting my
name, I get the name under which the IIS service must be running.... ASPNET.
Is there a way to get the client side environmental variable?

Thanks,

Steven
Nov 19 '05 #1
2 3069
Sure. Write a client-side ActiveX control that runs under the System account
on the client. Of course, getting the user to permit that ActiveX Control on
their machine could be tricky, but that's what security is all about.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Steven" <St****@discussions.microsoft.com> wrote in message
news:25**********************************@microsof t.com...
I have an asp.net application written in VB.net. I want to access a client
side environment variable. For instance, we set an environment variable
for
the UserName.

So, I write the code for retrieving the UserName. Instead of getting my
name, I get the name under which the IIS service must be running....
ASPNET.
Is there a way to get the client side environmental variable?

Thanks,

Steven

Nov 19 '05 #2
Hi Steven,

Maybe followings are what you need:

User.Identity.Name: user name (need to deny anonymous
access)
Request.UserAgent: the raw user agent string of the client
browser
Request.UserHostAddress: the IP host address of the remote
client
Request.UserHostName: the DNS name of the remote client

HTH,

Elton Wang
el********@hotmail.com

-----Original Message-----
I have an asp.net application written in VB.net. I want to access a clientside environment variable. For instance, we set an environment variable forthe UserName.

So, I write the code for retrieving the UserName. Instead of getting myname, I get the name under which the IIS service must be running.... ASPNET.Is there a way to get the client side environmental variable?
Thanks,

Steven
.

Nov 19 '05 #3

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

Similar topics

2
by: Eric | last post by:
Hi, I've a problem with trying to retrieve a session variable in an include file. Basically, the main asp creates a session variable: <% Session("var1") = "Hello" %> And then when I click...
3
by: Robert Oschler | last post by:
I know there isn't any $_POST array in Javascript, it exists on the server side accessible from PHP and other server side scripting languages. But I knew it would let you know specifically what...
15
by: Casanova | last post by:
Hello!! how can i get all the details of the environmental variables. If i use getenv, i will have to specify the name of the variable. for intsance i will have to give getenv("PATH") How can...
6
by: Ken Allen | last post by:
I am relatively new to .Net and C#, but I hav ebeen programing in other languages and done some COM work for a number of years. I am attempting to understand how to map an older program...
4
by: Shiraz | last post by:
Hi I'm using Visual Studio Installer to make my installer, and have not as yet figured out a straightforward way to use it to set environmental variables. Amongst the various things I tried, I'm...
9
by: Sathyaish | last post by:
In which physical file are the python environmental variables located? I know I can access them using the: os.environ.get('PYTHONSTARTUP') or os.environ.get('PYTHONPATH')
2
by: Rob Long | last post by:
Hi there Is there any way to access private variables directly from within a priviliged function? I have a situation where the priviliged function's execution context contains variables of the...
7
by: tshad | last post by:
How do you hide an asp.net object and still be able to access it? I had my email in a session variable, but you can't access the session variable from Javascript (I don't think - since Javascript...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.