Get current logged-in windows user in google chrome
Hello everyone, I have a question for you: I have built a web
application, until now, used it only with internet explorer. I'm now
want to make it usable in google chrome as well, but there is one
thing I can't work out yet: In my javascript code, I've used an
ActiveX object in order to fetch the current logged in windows user.
As I know, ActiveX will not work on google chrome, but my question is
if there is an alternative way in order to fetch the current user in
google chrome.
Thanks in advanced,
Tal Tchernihovski, taltcher@gmail.com
If you're trying to authenticate folks using their windows (Active Directory) accounts in the local domain, you'll want to just use Windows Authentication (NTML). This is as simple as checking a few boxes if you're running .NET/IIS. Chrome (and IE, of course) should correctly authenticate user's behind the scenes, making usernames available server-side, which can then be sent client-side as-needed.
no, I'm not writing aspx pages, this is html pages hosted application
If you've got no server-side executed code, I don't think you'll be able to get what you want. But, it leads me to wonder, why do you need the client's username if you're not doing anything with it server-side?
I'll explain to you: until now, on internet explorer I used WScript.Network
ActiveX object, and after I fetched the user name, I called a web service with soap request which giving me all the groups which the user belongs to.
So I wondered if there is similar way to fetch the user name in google chrome browser.
The only way I know to accomplish this is to enable NTLM on the web-service, and rather than have the webservice accept a username as a parameter, pick it up using the NTLM-authorized user object. (I'm not sure offhand what the code looks like to do this.) The only safe alternative, I think, is to ask the user to enter some credentials.
Bookmarks