B
B
Bekkazy2017-09-22 16:34:59
JavaScript
Bekkazy, 2017-09-22 16:34:59

How to get the windows account name in JavaScript?

There is a task to pull out the username windows.
Googling, I realized that JS does not have access to the username. You can only use AcniveX in IE.
BUT, Asp.Net has access.
The question is how to execute an Asp.Net method in JS. Or maybe there are other methods?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Perov, 2017-09-22
@SnaIP

Send a request to something that can be accessed and read the response

T
ThunderCat, 2017-09-22
@ThunderCat

https://stackoverflow.com/questions/16184685/how-d...
I understand it only works for asp-based applications.

R
Roman, 2017-09-23
@yarosroman

In IE we expose pass-through authorization, in IIS Windows authorization, and JS Ajax request, in ASP.Net we also do Win - authorization, and return the username to the request.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question