We have a pure html page running in our IIS, and we would like to know what logged-in users are accessing the page. By "logged-in" users I mean a user that looged on to our intranet in their Windows machine.
It seems that I can't retrieve this information with javascript or html, so I was considering using .net for this, something like the following:
System.Security.Principal.WindowsIdentity.GetCurrent().Name
Is it possible to add server-side code to this HTML page without having to go to Visual Studio to create a solution or project?
I just don't want to have to "convert" this .HTML into an .ASPX just for one line of code. These html pages have tons of javascript charts, and I know something will break if I open it in VS.
.htmlfile is not going to be touched by your server. It's just a file and it will be served to the browser as such. Putting any code in it that is meant to be executed server-side will fail because the server won't even bother parsing it. You'll have to name the file with an.aspxextension in order for the server to take a look at it. Consider checking out this tutorial which has a bare bonesaspxpage.