0

I'm looking for a way to get the client domain and username into a ASP Page. As far as i can tell this is impossible to do with pure ASP.

I've read that one possibility would be to write a ActiveX control. But this is not that easy and i have never done something alike. Are there alternatives to get the client's system variables ?

Timon
  • 1,003
  • 1
  • 9
  • 38
  • why do you need this information? If you want the information for some authentication, let the user type it into your user interface. Maybe some alternative technologies or workflow is a better way. So please provide some more information. – BendEg Jan 16 '15 at 10:42
  • Users need be be logged in automaticly ( intranet website ) when they enter the site. This was a critical requirement for the customer. – Timon Jan 16 '15 at 10:55
  • And a `one-time` login and than working with cookies is not possible? I would argue with a very unsecure system, with such an autologin. Because someone else with the same domain\user token could also login to your site automatically. – BendEg Jan 16 '15 at 10:57
  • what is with mobile clients? On your smartphone you do not have a domain\user as a "system-variable". – BendEg Jan 16 '15 at 11:00
  • They do not want this. For fear their employees will not use the intranet. The first thing that needs to happen when the machine starts is that the browsers starts, goes to their intranet and logs them in. This is non negotiable for them. – Timon Jan 16 '15 at 11:03
  • i am sure, that is not possible the way you want it. Maybe with some ActiveX Controls, but not with plane html and javascript. I edited my answer. – BendEg Jan 16 '15 at 12:11

1 Answers1

0

No, and that is good. The reason why this is not possible, is for your own security. JavaScript executed in your browser should not get any access to internal system/session information.

You have to know, that your browser does not has to do anything with ASP.Net, you only have HTML, CSS and JavaScript technology. And with this 3 technologies, you are not able to do this.

I don't know, if this could work with some ActiveX Controls.

BendEg
  • 20,098
  • 17
  • 57
  • 131