Access Client Side Environmental Variables

G

Guest

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
 
K

Kevin Spencer

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.
 
E

Elton Wang

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
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top